How to paste net4 data into a third party web page (yahoo page)

I have a net4 application that has a session variable (it is a stock symbol).

What I want to be able to do is open http://finance.yahoo.com/ , paste the session variable into the “yahoo enter symbol” field, and click the “get quotes” button.

I think I am looking for javascript code to do this.  I do not know javascript, but it seems to me the tasks are to

Open yahoo window
Identify yahoo control to paste net4 session variable
Paste the variable
Identify get quotes button
Click the button

Any suggestions?

Thanks

CGee
williecgAsked:
Who is Participating?
 
gr8gonzoConsultantCommented:
If URL variables are not an option, then I'm afraid you're out of luck unless your application resides on a subdomain of caddoassessor.org. What you're describing is cross-site scripting and it's specifically and explicitly locked down by every major browser because of the security problems it opens up.

If your application IS on a subdomain of that caddoassessor.org, then you can set up a bit of script on both sides to allow this to happen, but it requires changes on both sides.

Trying to access the HTML DOM of a remote domain using Javascript will result in access denied errors in your Javascript console, and there's really no good way around it.
0
 
gr8gonzoConsultantCommented:
It will make a difference what programming language is used for the session variable, since Javascript cannot read session variables. The programming language (PHP, ASP.Net, etc...) has to provide the session variable to Javascript.

Once Javascript has it, this is easy using the window.open() Javascript command and the direct stock lookup URL. The window.open reference is here:

http://www.w3schools.com/jsref/met_win_open.asp

Here's an example of how you would use it:

<script type="text/javascript">

// An example of calling the function for ORCL stock symbol:
showYahooFinanceFor("ORCL");

// The function to open the window
function showYahooFinanceFor(stock)
{
  window.open("http://finance.yahoo.com/q?s="+stock+"&ql=1");
}
</script>

Open in new window


I would suggest that you expand the zones of this question to include the programming language that you're using on the server.
0
 
williecgAuthor Commented:
Thanks I will expand to include net4.

The example I gave was an illustration.  The steps I outlined are what I need to know:  open window, find input field on webpage, enter data, find go button, click go button.


https://www.caddoassessor.org/publicsearch/Search.aspx is the window to open
paste  151601000001700  into the geo number blank.
click the search button

url variables are not an option.

thanks
0
 
RobOwner (Aidellio)Commented:
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
0
 
gr8gonzoConsultantCommented:
There is an answer here, but the answer is that you cannot do it in the way that the asker is requesting. Unfortunately, it's just standard browser security policy.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.