homepage Welcome to WebmasterWorld Guest from 54.145.183.190
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
JS link how do i write it?
need to open a pop up window how do i write it for thisparticular task
Oslo2004

10+ Year Member



 
Msg#: 2374 posted 2:54 am on Sep 14, 2004 (gmt 0)

Hi there i am trying to get a banks pop up window to come up and i have the javascript from the bank but how do i code the "pay now" button so that it brings up the banks pop up window?

This is the javascript:

function gotopay(sDescription, sEmail, sUniqueID, iAmount) {
// New Window options
sResize = 'yes';
sToolbar = 'no';
sScrollbars='yes';
iWidth = 680;
iHeight = 560;
sSite = 'https://www.ipg.stgeorge.com.au/servlet/webpay.website.Simple';
sClientID = 'clientid=<... put your CLIENTID here ...>';
sURL = sSite + '?' + sClientID + '&description=' + sDescription + '&invoice=' + sUniqueID + '&amount=' +
iAmount + '&email=' + sEmail + '&t=1';
//alert(sURL);
window.open(sURL,'','resizable=' + sResize + ',toolbar=' + sToolbar + ',scrollbars=' + sScrollbars + ',width='
+ iWidth +',height=' + iHeight);

So where i want the hyperlink i write what?

<a href="function.gotopay?>

Thanks any help would be much appreciated.

Enrico

 

Rambo Tribble

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2374 posted 3:24 am on Sep 14, 2004 (gmt 0)

You can use the javascript pseudo-URL, as in <a href="javascript:gotopay();"></a>, but that will expose you to scorn and derision within the confines of this forum. The preferred method, despite its verbosity, is <a href="#" onclick="gotopay(); return false;"></a>. Note that you will need to include the values for your variables (sDescription, sEmail, sUniqueID, iAmount) between the function calls' parentheses, separated by commas, something like: onclick="gotopay('stuff','whosit@wheresit.zap','who123',200);"

Note that the single quotes are not needed around a numeric value, but are required for character strings.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved