Click to See Complete Forum and Search --> : opening forms in new sub windows
ricardo259
11-17-2003, 08:37 PM
Righto then
I have created a webpage with links to some enquiry forms, in which the user can enter their enquiry details.
I know that to get these forms to open in a new window requires a TARGET="_blank" attribute.
But how do I get the new window to open as a smaller, pop-up type window, i.e. not full screen?
thanks
s0ms0m
11-18-2003, 12:42 AM
<a href="javascript:location='current.html';window.open('nextpage.html','label','height=h,width=w')">Link Text</a>
current.html is the page where this code will go.
nextpage.html is the page to open in a new window.
label is the 'title' of the new window.
height and width are self explanatory.
You should provide an alternative link for the ~13% of users with JavaScript disabled, or better yet--not use the jaavascript: protocol at all.
[J]ona
ricardo259
11-18-2003, 03:44 PM
thanks for your help.
unfortunately the above code doesn't work for me, i get a "Cannot Find Server" message.
i have tried the suggested A HREF link code, and also inserting the main parts of this into the FORM command.
any other suggestions?
cheers
Your 404 "File Not Found" error is a result of not changing the variables suggested by s0ms0m.
[J]ona
ricardo259
11-18-2003, 06:53 PM
to jona
-its not a 404 File Not Found error its a Cannot Find Server error.
- of course i changed the variables.
- i may well write an alternative non-javascript link, right now i just need one that works...
Server errors are from the server... Only time I ever get a server error is when there is something wrong on the server-side... Did you get a JavaScript error?
[J]ona
ricardo259
11-19-2003, 05:02 PM
still not sure what the problem is. haven't received any javascript errors.
i have attached my original txt file, at present the buttons open the forms in new windows, which is o.k., but if anyone can get them to open in smaller windows i would be grateful.
cheers
s0ms0m
11-19-2003, 11:16 PM
If you're sticking with JavaScript, remove all spaces from the label element.