Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass variable with getURL....old posts no help

Status
Not open for further replies.

fedtrain

Instructor
Jun 23, 2004
142
US
Hello,
Brand new to actionscipt...some javascript...etc.

I need to call a web page that will load the appropriate .pdf when the page is opened. I need to do this, because I am running into focus issues and the page will have javascript to focus on itself.

Now...I got this code from a post back in '04...but it is not working.
flash -
Code:
on (release) {
	var pdfpage = "google.com"
	getURL("testDave.htm", "_blank", "GET");
}
html -
Code:
<script>
var redirect = location.search;
alert (redirect)
redirect = ("[URL unfurl="true"]http://www."[/URL] + redirect.substring(1, redirect.length));
location.replace( redirect );
</script>

Now...I have also tried getURL ("testDave.htm?google.com") but my alerts are always blank...which then means the page is not going where it is supposed to.

Does anyone have a simple answer to what I am messin' up?

Thanks

"Credit belongs to the man who is actually in the arena - T.Roosevelt
 
Gee whiz!

The two example codes are absolutly eons away from each other.

in the (html?) script section you post:
<script>
var redirect = location.search;
alert (redirect)
redirect = (" + redirect.substring(1, redirect.length));
location.replace( redirect );
</script>

The lang intiating this "script", is it JS, or VB? Cause as it is there is no reference to flash or the variables past from it.

For most of the vars I pass from flash to clientside, I use ASP pages for the initialisation.

"send Vars from Flash using the "filename.asp" , "post", and from within the asp run the comparison for redirect.
 
Sorry Design, I have no idea what you are saying.

The first set of code is in the Flash movie....it is the on release action for the button.

The second set of code is in the page that is being called...and it is used as a redirect to pull up the page listed in the var. (I was hoping to only use on html page and then pass the var from four different buttons.)

That code works when you use one html to call the second html. It doesn't work when you use flash to call the second html....(the alert shows just a blank window...meaning nothing passing).

As for ASP or JSP or any other such thing...no go. I has to be just Flash projector and pdf's in a popup window. Can't use anything else at the moment.

Is this possible?

Dave

"Credit belongs to the man who is actually in the arena - T.Roosevelt
 
If so why not just open "google.com"?"
-------------------------------------------

I am having lots of problems with the focus of the page when it comes to opening a new window with the projector at fullscreen.
Sometimes it is infront...(my machine of course)
Sometimes loads behind in old browser windows...(two testers)
Sometimes nothing happens...(the bosses machine of course)

And these are all supposedly standardized machines. So I am attempting to build a page that can set focus on itself, then redirect to google for example. Hoping to somehow control the page with code and not based on people's machines.

Dave

"Credit belongs to the man who is actually in the arena - T.Roosevelt
 
Flash:

[tt]//
on (release) {
getURL("testDave.htm? "_blank");
}
//[/tt]

Javascript:

[tt]//
var searchStr = location.search;
location.replace(searchStr.substring(1, searchStr.length));
window.focus();
//[/tt]

Well basically it's more or less the same as your original code, but this one works. If this method will solve your problem is another matter though!

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top