share a page




JavaScript Source Code 3000: Page Details: Share A Page






























Share A Page







If you would like to have several sites sharing one 'contact us' page, you can! Each site can link to the same page (but each with a unique string) and the appropriate site's information will be highlighted yellow in the contact table. For example, If they clicked on the 'contact us' link on the real estate page, the table cell with the real estate contact email address will be highlighted yellow instead of white on the contact us page. Clever!


















JavaScript Source Code 3000: Page Details: Share A Page
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!




    




<!-- ONE STEP TO INSTALL SHARE A PAGE:

1. Copy the coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the BODY of your HTML document -->

<BODY>

<SCRIPT LANGUAGE="JavaScript">

<! >
<! >

<!-- Begin
string = "" + location.search;
string = string.substring(1,string.length);
person1 = string.indexOf("person1"); // unique person1 string
person2 = string.indexOf("person2"); // unique person2 string
person3 = string.indexOf("person3"); // unique person3 string

text = "<center><table border=1 cellpadding=3 cellspacing=3>\n";
text += "<tr><td colspan=2 align=center><b>Contact Us!</b></td></tr>\n";

text += "<tr><td";
text += (person1>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person1
text += "Person 1: </td>\n";
text += "<td align=center";
text += (person1>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person1
text += "<a href='mailto:person1@site.com'><b>person1@site.com</b></a></td>\n";
text += "</tr>";

text += "<tr><td";
text += (person2>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person2
text += "Person 2: </td>\n";
text += "<td align=center";
text += (person2>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person2
text += "<a href='mailto:person2@site.com'><b>person2@site.com</b></a></td>\n";
text += "</tr>";

text += "<tr><td";
text += (person3>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person3
text += "Person 3: </td>\n";
text += "<td align=center";
text += (person3>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person3
text += "<a href='mailto:person3@site.com'><b>person3@site.com</b></a></td>\n";
text += "</tr>";

text += "</table></center>";
document.write(text);
// End -->
</script>



<!-- Script Size: 1.94 KB -->










Wyszukiwarka

Podobne podstrony:
page$
page&
install product page
page36
page 1
page 8
page3
les09 page handling tm
page2
page&7
new page
page 1
page?2

więcej podobnych podstron