• 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

I need help! trying to post to a page w/o opening the page..

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy all!
I am trying to post to a web page but I don't want the page to open, either in the current window or a new one. Is this possibly???
What I am trying to do is:
1 have a user enter contact info
2 upon hitting submit, post the info to a url
3 not have the url open (in a page of the window)
4 automatically submit on the "posted" url
<FORM NAME="submitToCell" METHOD=POST ACTION="HREF=http://66.77.1.123/index.php?number=3193211010&message=testing&Send=submit">
Am I way off on this one?!?
Any help for this newbie would be much appreciated!!!
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
zero height frame is the only way to go about it then. The page will be opened, but there would be no detection of it.
 
darren schild
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
zero height frame? Sorry but I'm a little lost on that one? would you be able to give a code example or know of where I could get my hands on some?
Would you have any other coding suggestions? Would you know if a servlet would do the trick?
 
Sheriff
Posts: 67746
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
Whether you post to a servlet, cgi, JSP, or just plain old HTML page, you are going to get a response.
Eric's suggestion of an invisible frame or iframe into which the response can be displayed unseen is your best bet.
(Btw, this is a GREAT technique for making changes to a page via a server round trip without having to refresh the page. The reponse is displayed in an invisible iframe and JavaScript within that response can manipulate the displayed page without a refresh.)
hth,
bear
 
darren schild
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Haven't worked with iFrames, I'll give it a shot. Would you have any examples?
Thanks for the advice!
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With regular frames it can cause a problem with surfers with bookmarking etc.......here is the code:
<frameset>
<frame name="hid" height="0" src="form.htm">
<frame name="viewed" height="100%" src="form.htm">
</frameset>

Inline Frame:
Bets bet:
<IFRAME src="hid.html" width="0" height="0"
scrolling="no" frameborder="0">/IFRAME>

Here is a good link to tell you more about frames:
http://www.w3.org/TR/REC-html40/present/frames.html
Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic