wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Can you send post method with javascript? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Can you send post method with javascript?" Watch "Can you send post method with javascript?" New topic
Author

Can you send post method with javascript?

Roy Stiles
Greenhorn

Joined: Sep 15, 2011
Posts: 2
Hi,
I am new to html and javascript. I am trying to do a website for user authentication for a wifi network. I am using a zyxel g-4100 device. The equipment requires the usage of html code to allow/deny access. The code follows:




I am trying to use javascript to have the user enter an access code which will return the url to the zyxel box rather than a simple agree/disagree button. The code follows:



I am sure there are a ton of errors in this code, as I said I am a novice. My problem is that with each code i get a different response from the zyxel unit. Of course the first code does exactly as needed. I think the reason the second code doesnt work right is that the first code is using the post method. Is there a way to incorporate the post method to see if this fixes my dilemma? Or, does anyone have any ideas or suggestions? Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60816
    
  65

Rather than use document.location, continue to use forms and submit them under script control.

Give the form an id (rather than a useless name), and then to submit the form:



[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can you send post method with javascript?
 
Similar Threads
problem in running a servlet
HTML does not print properly - table width exceeding 100%?
Make rows not appear when certain row value appears
dispaly image in jsp page
Horizontal scrollbar problem