Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

can anyone give me some javascript form advice?

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » DU Groups » Computers & Internet » Computer Help and Support Group Donate to DU
 
Matariki Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Jun-27-05 02:55 AM
Original message
can anyone give me some javascript form advice?
I'm trying to write the form results to an iframe. I thought that putting target="iframeName" into the form tag would do it. The results I'm getting depend on where I put the function call. If I put illegal code"function();" in the form tag it displays on a new page. If I put it in the input tag it displays the parent page inside the iframe.

Below is a stripped down version of my code. Any ideas appreciated. Or conversely any recommendations for a good forum to ask a question like this. Thanks.

the code:

<html>
<head>
<title>Form</title>
<script LANGUAGE="JavaScript" type="text/javascript">
function display() {
if (document.form1.Apple.checked == true) {
message = document.form1.Apple.value;
}
else {
message ="";
}
document.write(message);
}
</script>
</head>
<body>
<form action="" method="post" name="form1" id="form1" target="thisFrame">
<input type="checkbox" name="Apple" value="Apple">Apple
<p><input type="submit" VALUE="Display" illegal code"display();"></p>
</form>
<iframe name="thisFrame" id="thisFrame" scrolling="no" frameborder="1"></iframe>
</body>
</html>
Printer Friendly | Permalink |  | Top
Berserker Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Jun-27-05 09:03 PM
Response to Original message
1. try this
Instead of <iframe name "your http here"> try using <iframe src "your http here"> the rest looks just fine and if you are having trouble after that, you can use a site I do called http://admins101.com it is a site I use alot for help with html.
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Mon Apr 29th 2024, 07:39 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » DU Groups » Computers & Internet » Computer Help and Support Group Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC