• 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

form action problem

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have seen .js files loaded for use in forms..
i.e: <form name="myform" ACTION="myformscript.js" method="POST">
so, I copied my javascript into a blank .js file and saved it as myformscript.js. I thought that it would load my search results after hitting the search button but all I get is the script page without any page body.
how can i get myformscript.js to initiate a function within it from a form located on an external page.
this is a javascript searchscript if that helps.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
axiom82,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two things:
First, we have very few rules at JavaRanch but the number one rule is that your name must meet the requirements. You agreed to them when you registered so please update your display name to be your real first name space your real last name. Thanks.
Second, this particular forum is for Java, not JavaScript. (They are two very different things.) We do have a forum for JavaScript (just a little lower on the main page) so I'll move this there.
 
Michael McNally
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry about that
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can put this into the HEAD section:

then, add this
on your FORM tag.
The assumption is myformscript.js can be found under the javascript subdirectory
I hope this helps.
reply
    Bookmark Topic Watch Topic
  • New Topic