Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

adding javascript URL to Flash button

Posted on 2009-04-01
12
Medium Priority
?
313 Views
Last Modified: 2013-11-11
Hello

I was given a URL that will popup a chat session window. I'm not sure exactly how to enter the code in the AS. I have created a button with UP/Over/Down/Hit

The URL is listed below:
<!-- Presence aware IM link for Contact Page placement. -->
<A onclick="javascript:window.open('http://dm2.contactatonce.com/CaoClientContainer.aspx?MerchantId=29199&ProviderId=2573&PlacementId=3&OriginationUrl='+encodeURIComponent(location.href),'','resizable=yes,toolbar=no,menubar=no,location=no,scrollbars=no,status=no,height=400,width=600');return false;"href="#"><img onerror="this.height=0;this.width=0" src="http://dm2.contactatonce.com/getagentstatusimage.aspx?MerchantId=29199&ProviderId=2573&PlacementId=3" border="0"></A>

Open in new window

0
Comment
Question by:Trevor Local
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 20

Expert Comment

by:Gawai
ID: 24042171
in getURL() u can use that
or also in LoadVars()
ref
http://www.flash-db.com/PopUp/JavaScriptPopUp.php?page=4
0
 

Author Comment

by:Trevor Local
ID: 24042309
so do I place the entire code in between the () in the getURL? including the comment section?
0
 
LVL 20

Expert Comment

by:Gawai
ID: 24042353
no need of comment line :)


on (release) {
getURL ("javascript:NewWindow=window.open('http://www.yoursite.com/somepage.php?somequerystring=somevalue','newWin','width=400,height=300,left=0,top=0,
toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');  NewWindow.focus();
void(0);");
}

Open in new window

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Trevor Local
ID: 24042707
ok I'm missing something. I tried this code:
left out the comments and the <A onclick=
on (release) {
getURL ("javascript:window.open('http://dm2.contactatonce.com/CaoClientContainer.aspx?MerchantId=29199&ProviderId=2573&PlacementId=3&OriginationUrl='+encodeURIComponent(location.href),'','resizable=yes,toolbar=no,menubar=no,location=no,scrollbars=no,status=no,height=400,width=600');return false;"href="#"><img onerror="this.height=0;this.width=0" src="http://dm2.contactatonce.com/getagentstatusimage.aspx?MerchantId=29199&ProviderId=2573&PlacementId=3" border="0">
}

Open in new window

0
 
LVL 20

Expert Comment

by:Gawai
ID: 24046893
javascript:NewWindow=window.open
0
 

Author Comment

by:Trevor Local
ID: 24051707
tried adding that - nothing pops up.
0
 
LVL 20

Expert Comment

by:Gawai
ID: 24051738
u need to remove <img......>
and let me know. can i see that online ? let me know the site url
0
 

Author Comment

by:Trevor Local
ID: 24051868
my site: http://cls63.brinkster.net/index.html
on the Financing page and the Contact page, there's a button to pop up a chat window function.

0
 
LVL 20

Accepted Solution

by:
Gawai earned 2000 total points
ID: 24052507
try this one, either remove
&OriginationUrl='+encodeURIComponent(location.href)

or you can have :
&OriginationUrl=http://cls63.brinkster.net

 
on (release) {
getURL ("javascript:NewWindow=window.open('http://dm2.contactatonce.com/CaoClientContainer.aspx?MerchantId=29199&ProviderId=2573&PlacementId=3','newWin','width=600,height=400,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=Yes,fullscreen=No');  NewWindow.focus(); void(0);");
}

Open in new window

0
 
LVL 20

Expert Comment

by:Gawai
ID: 24052532
0
 

Author Comment

by:Trevor Local
ID: 24052707
I used the code you just gave- I think that's it! Will do some testing and let you know.
thanks!!
0
 

Author Comment

by:Trevor Local
ID: 24140848
thanks for the help!!
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

670 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