• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to submit a request to a url

 
subodh gupta
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I am trying to submit my page to a url formed in a javascript can you please guide me how to do it.

the problem i am facing is the page gets submitted to the action mentioned in form tag.

if i remove it than it doesn't go anywhere.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, we need to figure out exactly what you want to do.

You don't submit a page.
You submit a form.
When you submit a form the request goes to the URL in the form's action attribute. If you don't explicitly provide an action attribute, the default (which is the URL of the current page) is used.

What is it, exactly, that you're trying to do?
 
Prasad Tamirisa
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to submit my page to a url formed in a javascript can you please guide me how to do it.


I presume that you are trying to submit the form with out explicitly mentioning the action attribute....

If that is so, you can set the action attribute anywhere before your form closure tag (</form> like below.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Prasad Tamirisa:

If that is so, you can set the action attribute anywhere before your form closure tag (</form>

No, that is not necessary.
 
Prasad Tamirisa
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, that is not necessary.

Agreed. . The following holds good in that case.
When you submit a form the request goes to the URL in the form's action attribute. If you don't explicitly provide an action attribute, the default (which is the URL of the current page) is used.

[ May 17, 2008: Message edited by: Prasad Tamirisa ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic