PDA

View Full Version : NewWin


pleasehelpme
02-09-2003, 09:41 AM
Hey any1 with JavaScript Knowledge

Here (http://lasttake2003.tripod.com) is my site.
I have 2 scripts in the <head></head> section of my page. The first on works fine - it opens a pop-up when you enter the site, that is filled with a flash file.
But i have another script after that, that should be exactly the same (for a function) but with a form in it. But for some reason it does not work....
Here is that script :

___________Starts Here_____________

<script LANGUAGE="Javascript">


function Order()
{
NewWin2=window.open('','NewWin2', 'width=800,height=800,toolbar=0,status=0');

NewWin2.document.write("
<title>LastTake Order Form</title>
<table border='0' cellpadding='0' cellspacing='0' width='60'>
<tr>
<td width='50%'>
<Form ACTION='/bin/script_library/form_handler_file' METHOD=POST>
<p><B>Choose the number of films you require</b></p>
<select name='number' size='1'>
<option selected>Choose Here</option><option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
</select>
<p><B>Enter the names of your desired films here</b></p>
<p><textarea name='filmswanted' cols='25' rows='5'>Write here</textarea></p>
<p><B>Enter your email address here</b></p>
<p><input type='text' name='email' size='33' maxlength='50'></p>
<p><B>Enter your name here</b></p>
<p><input type='text' name='name' size='33' maxlength='50'></p>
<p><table border='0' cellpadding='0' cellspacing='0' width='300'>
</td>
<tr>
<td>
<B>Click on the Clapper-Board to Submit your Order Now.</b>
</td>
<td width='115'><img src='clapper.gif' width='115' height='97'></td>
</tr>
</table>

<INPUT TYPE='hidden' NAME='end_display' VALUE='http://www.tripod.com'>
<INPUT TYPE='hidden' NAME='required' VALUE='filmswanted'>
<INPUT TYPE='hidden' NAME='order' VALUE='name, number, filmswanted, email'>
</form>
</td>
</tr>
");
}


</script>

___________Ends Here_____________

Can any1 see what is wrong about this ?

any1 help would be nice

UrbaN

Graeme Hackston
02-09-2003, 04:42 PM
Not enough info. Does the form script work on its own? What event are you using to fire them and how is this done?

pleasehelpme
02-09-2003, 08:49 PM
yeah the script works on its own if i change te 's back to "s...
i use a <A HREF="#" onClick="Order()">here</a> to execute the function...

does this help ?

Graeme Hackston
02-09-2003, 09:06 PM
Yes that rules out some possibilities. What do you mean by this

if i change te 's back to "s...

Also, look for any variable or functions with the same names

pleasehelpme
02-10-2003, 08:23 PM
i mean when i write newWin2.document.write(".......
i can't put speech marks in, otherwise it would close the statement prrmaturely, so i have to change them to apostrophes..
i dont think i have any variables with the same name

urban