Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Javascript Form Targetting
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedJavascript Form Targetting

 Post Reply Post Reply
Author
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Direct Link To This Post Topic: Javascript Form Targetting
    Posted: 24 May 2005 at 12:12am
Is there any way that I can use javascript to alter the target and action of a form, like document.form.target='this_window' and document.form.action='thepage.htm'?
 
or have i just answered my own question?
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Direct Link To This Post Posted: 24 May 2005 at 1:15am
I think you may of possibly answered your own question.  
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Direct Link To This Post Posted: 24 May 2005 at 2:02am
lol ok...
 
I went looking again and found a list of properties, but what i found said that only form.action was read/write... is that true? or are the writers of that site full of it?
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Direct Link To This Post Posted: 24 May 2005 at 2:55am
Sorry don't quite understand,

document.form.action

Should work fine as a read and write.  EG reading the value:

var myVar = document.form.action;
(possibly document.form.action.value;)

And write would be:

document.form.action = 'new.asp';

Hope this helps.
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Direct Link To This Post Posted: 24 May 2005 at 4:12pm
i found something that suggested that while action could  be changed using document.form.action = 'thepage.asp', the target could only be read, not written.
 
Is it true that target is a read-only property as far as js is concerned, or do you still call it as document.form.target = 'New_window'?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.