[Last Call] Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2012-08-27
Medium Priority
Last Modified: 2013-11-20
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?


Question by:williecg
  • 3
LVL 35

Expert Comment

ID: 38340527
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:


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

<script type="text/javascript">

// An example of calling the function for ORCL stock symbol:

// The function to open the window
function showYahooFinanceFor(stock)

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.

Author Comment

ID: 38341924
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.

LVL 35

Accepted Solution

gr8gonzo earned 2000 total points
ID: 38341979
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.
LVL 43

Expert Comment

ID: 39659879
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".
LVL 35

Expert Comment

ID: 39659880
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.

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question