Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
need help w/ linking from external source...thanks
Old 07-07-2006, 12:37 AM need help w/ linking from external source...thanks
Novice Talker

Posts: 5
Trades: 0
Hi...

I have a script that I want to move to an outside source (i.e. remove from the xhtml coding of my webpage and link back to it). How can I alter this script and/or my html code so that I can specify which link i want this to work for and yet keept this entire code out of my xhtml.

In short, what changes can I make to make such a coding, valid...

Code:
<script src="PopMeUp_1.js" type="text/javascript"></script>

I currently have this script in my <head> section w/ the following in the body:

Code:
<a href="javascript:PopupMe1()">EMAIL UPDATES</a>


This is the script I have:

Code:
<script language="JavaScript1.2" type="text/javascript">
var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"
var bouncelimit
var direction="up"
var usedropin=1
function PopupMe1(){
if (!dom&&!ie&&!ns4){
window.open("searchbar.htm", "", "scrollbars=1")}else{
bouncelimit=32 //(must be divisible by 8)
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
crossframe=(dom)?document.getElementById("cframe") : ie? document.all.cframe : document.cframe
crossframe.src="searchbar.htm"
if(usedropin){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossobj.top=scroll_top-250+calunits}
crossobj.visibility=(dom||ie)? "visible" : "show"
if(usedropin){
dropstart=setInterval("dropin()",50)}}}
function dropin(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<0+scroll_top){
crossobj.top=parseInt(crossobj.top)+40+calunits
if (parseInt(crossobj.top)>0+scroll_top){crossobj.top=0+scroll_top}}else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)}}
function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)}}
function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"}
function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}
</script>

Thanks for all your help!
Please let me know if my description makes no sense.

Vishal
V1SHAL is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to need help w/ linking from external source...thanks
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12649 seconds with 12 queries