JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 15th, 2001, 12:36 AM
Paulblo Paulblo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: San Jose, CA
Posts: 58 Paulblo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 14 m 9 sec
Reputation Power: 13
URL JavaScript Function

I would like to call a function to open a new window and with the url in this code. I don't know how to call function in a href with in the href attribute? <A HREF=\"" + db[i].URL + "\" TARGET=\"" + top + "\">"
Here is the function thaqt I would like to call:

<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>

MM_openBrWindow('<?print"$popup";?>','shipwin','scrollbars=yes,resizable=yes,width=800,height=100,left=0,top=0');


Code:
 if (db[i].URL == "" || db[i].URL == null) {
      Outline += " " + db[i].display      // no link, just a listed item  
      }
    else {
      Outline += " <A HREF=\"" + db[i].URL + "\" TARGET=\"" + top + "\">" + db[i].display + "</A>"
      }
	// Bold if at level 0
    if (currIndent == 0) { 
      Outline = "<B>" + Outline + "</B>"URL == null) {


Any help would be great!
__________________
Thank you,

Paul B Hepworth

Questions & Answers http://www.lds.org

Reply With Quote
  #2  
Old May 15th, 2001, 04:27 AM
Jonathon's Avatar
Jonathon Jonathon is offline
T-Shirt Tragic
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2001
Location: Melbourne, Australia
Posts: 886 Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 6 h 53 m 39 sec
Reputation Power: 320
Send a message via Skype to Jonathon
you call a function in a href like this
Code:
<a href="javascript:myfunction()"></a>

so I guess your Outline variable might look something like this:-
Code:
"<A HREF=\"javascript:MM_openBrWindow("+db[i].URL+",\'windowName\',\'windowFeatures\')\">"+ db[i].display + "</A>"

Reply With Quote
  #3  
Old May 15th, 2001, 12:32 PM
Paulblo Paulblo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: San Jose, CA
Posts: 58 Paulblo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 14 m 9 sec
Reputation Power: 13
Thanks

Thanks it worked well.

I accually ended up using this:

Code:


"<A HREF=\"http://nextpage.com\" onClick=\"MM_openBrWindow("+db[i].URL+",\'windowName\',\'windowFeatures\')\">"+ db[i].display + "</A>"


Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > URL JavaScript Function

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap