Load .js Depending On Referral

Aug 28, 2000

I'm using the everyone.net search plugin in my site. AX3 is in english and spanish, so I'd like to load a different menu (spanish or english) depending on the clicked link.

View 6 Replies


ADVERTISEMENT

User And Referral Clicks - Open Link In Same Window

Jan 9, 2009

I have this website that logs users clicks and their referrals clicks. I have graphs for each of these things. I currently have it working that when a user clicks a link on a page, it opens up another page and shows the graph. I want this to be sort of like a "drop down" window when they click. Here is a picture of when the link is not clicked: And when the blue circle (the thing boxed in red) is clicked:

View 4 Replies View Related

Load CSS Depending Upon Screen Resolution

Apr 10, 2006

I'm trying to write a javascript that detects the screeen resolution size and load a css sheet accordingly. Can someone see why the below javascript does not work?

<script language="JavaScript1.2">
<!--

if (screen.width==800||screen.height==600) //if 800x600
{document.write("<link REL='stylesheet' href="../site.css" rel="stylesheet" type="text/css" />");}


else if (screen.width==640||screen.height==480) //if 640x480
{document.write("<link REL='stylesheet' HREF='http://www.mysite.com/site.css' TYPE='text/css'>");}

else if (screen.width==1024||screen.height==768) //if 1024x768
{document.write("<link REL='stylesheet' HREF='http://www.mysite.com/site.css' TYPE='text/css'>");}

else //if all else
{document.write("<link REL='stylesheet' HREF='http://www.mysite.com/site.css' TYPE='text/css'>");}

//-->
</script>

View 5 Replies View Related

Load External Script Depending On Window Size?

Jun 15, 2011

I need a script for the head of my HTMl file that examines the size of the browser window. If the browser is a certain size, then the HTML will load a external javascript.

View 1 Replies View Related

JQuery :: Load Different Php File Asynchronously Depending On Select Form

Feb 4, 2011

I have a php file that generates different content based on a get variable in the url. test.php?foo=bar1

I'm loading this into a div on my site with

<script>
$(document).ready(function() {
$("#result").load("test.php?foo=bar1");
});
</script>

Well that works, but i want to add a select option <option>bar1</option> option>bar2</option>

And depending what option is selected, i want to load that get instead. So if bar2 is selected, the load should (asyncronosly) load test.php?foo=bar2 instead.

View 1 Replies View Related

CSS-changes Depending On Document.refferer

Jul 20, 2005

I have a problem - I manage two websites, with two different style sheets
(one for each site), but they both share hte same public message boards and
I want to change the CSS used by the forumn template depending on which site
the user came from - this must be done in JScript, as the boards are hosted
offsite and we cannot edit the serverside language.

Unfortunately, its been over two years since I undertook a serious JScript
project and cannot remember alot of what to do. I was planning on this:

<script language=JavaScript>
if (document.reffer="http://www.website1.com"){
document.write('<link rel="stylesheet"
href="http://www.website1.com/css/css.css" type="text/css">
}
else if (document.reffer="http://www.website2.com"){
document.write('<link rel="stylesheet"
href="http://www.website2.com/css/css.css" type="text/css">
}
else {
document.write('<link rel="stylesheet" href="css/css.css"
type="text/css">
}
</script>

View 1 Replies View Related

JQuery :: $.animate With One Value Depending On The Other

Apr 30, 2010

i want to make an animation where one value depends on the other.

Let's say i want to animate both the 'top' and 'marginTop' properties, where i want the marginTop property to use the current value of the 'top' property.

I could do something like this:

$("#foo").animate({
top : "100px",
marginTop : ($("#foo").css('top') * 2) + 'px'
});

But that doesn't work, i guess because the css('top') method only gets called after the animation has finished.

Is there a trick to get the value of 'top' in the 'marginTop' property?

View 2 Replies View Related

Renaming ID Depending On Web Browser

Sep 19, 2009

I need a function to change an id depending on the webrowser.if the guy uses internet explorer the id of the main there as to be renamed mainie.if he is with firefox the id of the main as to be renamed mainfff and if he uses opera the id of the main as to be ranamed mainop.

View 11 Replies View Related

Condition Depending On Screen Rs / What To Do?

May 16, 2010

I m crearting a pop with some parameters like locationbar,statusbar=no and its height and width 1280*800. but originally i have given its hight to be 699 to pixel a viewpoint.. can i put some if condition. checking if the resolution isn't at 1280 * 800 and if so than the popup should have scroll. is there anymore smater way to handle this? as of now if someone has a less Res. everything get clipped off

View 4 Replies View Related

Display A Div Depending On It's Class?

Jun 10, 2010

say that I have 2 css classes, 1 is "test failed" and the other is "test ok". And that i have like 20 diffrent div's with their own id, and class either "test failed" or "test ok".Code:<div class="ok/failed" id="one-twenty"> </div>I would like to (depending on what button the user pushes" display the "ok" test cases or hide them and the same thing for the "failed" one's.How can this be done in javascript?Tried the following but it does'nt work

Code:
var allHTMLTags = new Array();
function getElementByClass(theClass) {

[code]....

View 5 Replies View Related

Right And Down Arrow To Appear Depending On Whether A Div Appears

Aug 18, 2010

Basically I want a right and down arrow to appear depending on whether a div appears. If the header div is clicked, the subdiv's display toggles block or none. At the same time id like the arror img to change accordingly.

This is my current function, it works fine

I've tried many times to add a script that'll change the src but no luck at all..

The image name is simply arror$categoryId...By the way, the reason for the '. .' etc is because this is printed via php.

View 12 Replies View Related

Code To Show GIF / SWF Depending On OS

Aug 3, 2011

This has probably done a million times, and it's probably somewhere on this forum, but for the life of me, I can't find a thread on it. Maybe I'm using the wrong search words. The only one's I can find is a browser detect of explorer.This is what I am trying to get accomplished (maybe someone can point me at a good write-up):I'll write it in a sort of logic-statement language (I'd like to have this in a table cell so that it will only show one of two banners. Either a GIF/JPG or SWF depending on OS):[code]

View 14 Replies View Related

Loading Css In Depending On URL Protocol?

Aug 19, 2011

here is some code that I am working on to load styles into a page depending on the protocol of the URL. It seems to load the .css files correctly in FF but in IE I get an "document.head is null or not an object" error.

Here is the code:

window.onload = function(){
var protocol = document.location.protocol;
var ref = document.createElement('link');

[Code].....

View 10 Replies View Related

Page In Frame Depending On Screenresolution?

Jul 20, 2005

Does any one know how to load a sertain page in a sertain frame depending on
the viwers screenresolution?

What i mean is that if a user has 800*600 i want page 800.htm to be loaded
in frame "content". If the user has 1024*768 i want page 1024.htm to be
loaded in frame "content".

View 2 Replies View Related

Search Depending On What User Selects

Jul 20, 2005

what i want to do is create several radio buttons and a textbox for
searching purposes. the search will perform a search depending on
which button the user selects.

here is what i have now:

- for each radio button, i use the onClick event handler, which calls
a function called showMe()

- showMe() {
if (button 1 was selected)
document.write('form which will search down path A');
else if (button 2 was selected)
document.write('form which will search down path B');
else if (button 3 was selected)...
}

this works, but once the user makes their selection, the search form
will pop up on another page. how do i fix it so that the search form
will display on the same page as the radio buttons? Is there any
other way to accomplish this?

View 1 Replies View Related

JQuery :: Function To Run Depending On Variable Value

May 27, 2011

$("#ltr").live("mouseover", function() {
//swap class names
$("div#container").removeClass("rtl").addClass("ltr");
});
I run this function to swap class names when there is a mouseover event on an image with the ID "ltr". How would I run this same function but to occur when, for example, a variable "distance" was equal to 0? Basically, if distance = 0 then swap class names

View 2 Replies View Related

Displaying Image Depending On Browser

Mar 12, 2009

Does anyone here know of the javascript I'd use in a situation where I didn't want to display a certain image when the client is using IE6? I'm fine with displaying it in IE7 and Firefox, but don't want it displayed in IE6. The image is a PNG with a transparent background.

View 5 Replies View Related

Validating Array Depending On Values

Aug 11, 2009

I have two arrays that are tied together Ink1Data[][InkID] and Ink1Data[][Ink1Desc]. I also have this Javascript code to validate it:
var chksink1 = document.getElementsByName("Ink1Data[][InkID]");
for (var i = 0; i < chksink1.length; i++) {
switch (chksink1[i]) {
case (chksink1.value=1);
var i1Desc = "Ink1Data["+i+"][Ink1Desc]";
if (validate_required(i1Desc,"Please fill in a trim size.")==false)
{i1Desc.focus();return false;}
break;
case (chksink1.value=2);
var i1Desc = "Ink1Data["+i+"][Ink1Desc]";
if (validate_required(i1Desc,"Please fill in folding instructions.")==false)
{i1Desc.focus();return false;}
break;
case (chksink1.value=3);
var i1Desc = "Ink1Data["+i+"][Ink1Desc]";
if (validate_required(i1Desc,"Please fill in scoring instructions.")==false)
{i1Desc.focus();return false;}
break;
}}
Basically, I want to count how many are in the array (will be the same number for both) and then depending on the value of the first array, validate the second and kick an appropriate error if necessary. It should be pretty easy, but I can't seem to get the code to work.

View 13 Replies View Related

Show One Image Or Another Depending On The Value Of A Field?

Apr 23, 2010

I have a page that is displaying all the field values for an object. On that page, I want to display one image if the value of the field Reports_to is Jim, and another image if the value of the field Reports to is Bill. I've tried the following.

<script language = javascript>
var reportsto = document.getField('field_reports_to').value;
if (reportsto == �Jim�)

[code]....

View 6 Replies View Related

Open Pop Up Window Depending On Date?

Jul 23, 2011

I want to open a pop up window automatically on the date when i have mentioned in the function, means if the date is equal to 24/07/2011, then when i open the website open the pop up window...

View 15 Replies View Related

Scroll Div Left And Right Depending On Where The Mouse Is?

Aug 16, 2011

i have a container div with many other nested divs inside e.g.

<div id="thisOne">
div>Div 1</div>
<div>Div 2</div>

[code]....

View 1 Replies View Related

Rotating Site Depending On Dates

Jul 26, 2007

I have an e-commerce site and depending on the week, different things would be available for purchase. So week 1 would have one set of products and this would change week 2, 3, and 4. What I was planning to do was create the 4 different sites and upload the right one for the right week on to the host, but is there a way I can code the site to do this.

I saw a script that would rotate background images dpending on the date. The best way i can see this helping me is if the "enter site" link on my index page leads to the correct home page for the corresponding week, and from there it's just a matter of links and carts which I can definitely maintain. Is there a way to alter this rotating image script to rotate the link of the "enter site" button every 7 days amongst for sequential links.

I would really apprciate the help; I am still new to coding. Thanks alot.:thumbsup:

Here's the code i found for the rotating background image:

View 2 Replies View Related

Hide Fields Depending On Selection

Sep 1, 2009

In the following code I am attempting to get certain fields to only appear if the user Selects dependent else those fields should be hidden.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"[URL]">
<html xmlns="[URL" xml:lang="en" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>Display and Hide</title>
<script language="JavaScript">
function showhidefield(){
if (document.HelpAdd.RecordType.value == "Parent"){
document.getElementById("hideablearea").style.visibility = "hidden";
} else {
document.getElementById("hideablearea").style.visibility = "visible";
} }
</script>

</head>
<body>
<form name='HelpAdd' action='nextpage.asp'>
<table align="center" border="3" cellspacing="0" cellpadding="3">
<tr><td>Record Type:</td>
<td><select id="RecordType" name="RecordType" onchange=showhidefield()>
<option value='0'>Parent</option>
<option value='1'>Dependant</option><br/>
<tr><td>Topic Title:</td>
<td><input type="text" name="TopicName" ID="TopicName" maxlength="25"></td></tr>

<div id='hideablearea' style='visibility:hidden;'>
<tr><td>Parent:</td>
<td><select name="Parent">
<input type="text" name="ParentID" ID="ParentID" maxlength="25"></td></tr>
<tr><td>Topic Body:</td>
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $MaxFileSize ?>" />
<td><input id="helpfile" name="helpfile" type="file" /></td></tr>
</div>
<tr><td colspan="2" align="center">
<input type="submit" name="submit" value="Submit">
<a href="/help.php"><button>Back</a>
</td></tr>
<tr><td colspan="2" align="center">
<?php echo $Message ?>
</td></tr>
</table>
</form>
</body>
</html>

View 4 Replies View Related

Update Calendar Depending On Month?

Jul 26, 2010

I am trying to develop a calendar which hilights the days date (which I have done) but now I am on to the really tricky bit (for me). I need the calendar to change each month and because the different months have different days of the week for a day in that month and also don't have the same number of days I had to come to all of you because I don't know where to start.

<div class="cmonth">
<div class="ctrl">
<table cellspacing="0" cellpadding="0">
<tr>

[Code]....

View 3 Replies View Related

PING - And Do Different Things Depending On The Result

May 9, 2009

Is there a way to do a PING from within Javascript and do different things depending on the result, kinda like

Look at [url]

Hover the mouse pointer over the labels for doofus and dingbat to see how I want it to look.

View 2 Replies View Related

Change Second Menu Depending On Selection In First

Feb 15, 2009

Basically I have a form, with two simple select menus, both identical except for different name values to post:

HTML Code:
<p>Make current?</p>
<select name="is_current">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<br />

<p>Put in list?</p>
<select name="in_list">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>

Some PHP code governs whether the "yes" or the "no" option in either menu gets the 'default' "selected="selected" showing, based on database information. For instance, in the first menu, if the page deals with a case where the the first "is_current" value is indeed current, then the PHP code will write the default "selected="selected" for "yes":

HTML Code:
<select name="is_current">
<option value=yes" selected="selected">Yes</option>
<option value=no">No</option>
</select>

If the page deals with a case where the value isn't current, the selected="selected" code will be written for the "no" value instead. The same goes for the second select menu. Now, the logic of my situation requires that, if the user selects "Yes" in the first "is_current" drop-down, then only "Yes" should be available to select in the second "in_list" menu. Anyway, I don't know javascript very well, but I found a function that seemed to be able to do this.

Code:
<script type="text/javascript">
(function () {
function updateLevel() {
var limit = Number(this.value);
// find the next select element
var selects = this.form.getElementsByTagName('select');
var select;
for (var i = 0; i < selects.length; i++) {
if (selects[i] === this && selects[i+1]) {
select = selects[i+1];
break; .....

(Apparently the script has to be put or called just before the </body> tag at the end of the page.) Then the select menus are recast as:

HTML Code:
<p>Make current?</p>
<select name="is_current" id="in_list">
<option value="1">Yes</option>
<option value="2">No</option>
</select>
<br />

<p>Put in list?</p>
<select name="in_list">
<option value="1">Yes</option>
<option value="2">No</option>
</select>

Now this appears to work, up to a point. If the user selects "Yes" for the first "is_current" selection, then only "Yes" becomes available for selection in the second "in_list" menu. A posted value of "1" represents "yes", and a value of "2" represents "no". Except, in Firefox, the javascript somehow overrules the default selected="selected" code. That is, the source code in the browser is correct, but the javascript draws it incorrectly.

For instance, say the database/PHP has drawn selected="selected" for the value "yes" in the second menu. Even though I can see that the source code is OK in the browser, the javascript will make the browser show a "No" selection as the initial default. This happens in Firefox, though not in Safari, and I haven't tested other browsers yet. This may be obvious but I'm not sure of javascript.

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved