• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can you send post method with javascript?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic