windows.open?

How do I open another website and enter text, then submit. For example, is there a way that I can open www.google.com , enter a word to search, select search and have the new window be the window with the results? I found an example here http://www.tek-tips.com/faqs.cfm?fid=4872 but i want the java-script code to actually open up a website, enter data, then submit.

Comments

  • [b][red]This message was edited by the walrus at 2005-2-3 14:44:39[/red][/b][hr]
    : How do I open another website and enter text, then submit. For example, is there a way that I can open www.google.com , enter a word to search, select search and have the new window be the window with the results? I found an example here http://www.tek-tips.com/faqs.cfm?fid=4872 but i want the java-script code to actually open up a website, enter data, then submit.
    :

    you can only do that if it's a website on the same domain as the script that would do that (maybe even the same relative location.. ie folder, etc). you wouldnt be able to open google and make a script type in a search, because that would be a huge security risk, so javascript blocks that. think if someone made some javascript that opened a hotmail window and sent a virus everyone on that person's contact list. or if someone made some javascript that opened a popular website that has access to people's money, like amazon, and bought a ton of stuff from accounts that were already signed in.. you can however open a window that shows search results from google by telling it to go to [b]ht[italic][/italic]tp:[italic][/italic]//w[italic][/italic]ww.google.c[italic][/italic]om/search?hl=en&q=[blue][italic]search+item[/italic][/blue][/b]. but you cannot enter data into a form on someone else's website.

    if you wanted to enter data in a form on your website, then something could probably be done. i think javascript only checks to make sure the webpage is in the same relative location, and if so itll let you do what you want to the page. otherwise you dont have access to it.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion