window.location troubles


To make a long story short when I do a redirect like this...

if(window.location.hash.length > 0){ window.location = "http://" + "" + "/" + window.location.hash; }

it goes there, but on the refresh php can't see what was appeneded with the window.location.hash, so its like I'm going to

window.location = "http://" + " "

thoughts, ideas

if I got to that generated URL, without the redirect, it works fine.

please and
Posted On: Thursday 22nd of November 2012 09:30:47 PM Total Views:  156
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




window.location Help

im making a estate agency website for my college assignment and have come across a problem when using windows.location for some reason it is not working what i want to do is go to a page when searching the right content and then clicking the submit button so when i type hello for example into the text box i want to get relocated to renting1.html page but for some reason it is not working i know that the variable is set up right as if i change the content of the if statement to an alert then that works can anyone spot a problem in my code snipit Search House Name: Search function testResults() { var TestVar = form1.Search.value; if(TestVar=="hello") window.location = "renting1.html"; else alert("Invalid"); }
VIEWS ON THIS POST

75

Posted on:

Wednesday 17th October 2012
View Replies!

Slideshow troubles

I have a working slideshow that I'm running on about 15 pages on my site, problem is every time I go to a new page it starts up again. I'm using a simple timer and a loop of about 8 images. I was just wondering how when i navigate to a new page the slideshow doesn't reset Can't seem to find it online anywhere. Cheers
VIEWS ON THIS POST

170

Posted on:

Monday 12th November 2012
View Replies!

drop down and window.location

i have two dynamic drop downs of dealer id and category id which work properly with window.location var dealerid; function getList(xyz) { window.location='manage_products.phpcategory_id=' + xyz; } function getProducts(dealer_id) { var catid=document.form1.category.value; window.location='manage_products.phpdealer_id=' + dealer_id + "&category_id="+catid ; } but now i want to add static drop down of sub category and make use of window.location which i m not able to do Select Sub Category Batteries Leather & PU Cases Crystal & Rubber Coated Cases Car Mounts & USB Cradles AC Chargers & Car Chargers This is function that is not working var subid=document.form1.sub_catg.value; function getSb(subid) { window.location='manage_products.phpdealer_id=' + dealer_id + "&category_id="+catid + "&sub_catg=" + subid ; } vineet
VIEWS ON THIS POST

87

Posted on:

Friday 16th November 2012
View Replies!

window.location and Opera problem

all! I am trying to make my site work good on the popular browsers and came across a wierd bug that I can't understand. To keep this simple I wil make up the example. Let's say I have this in the head of my document: document.body.style.backgroundColor = '#000000'; window.location = http://www.google.com; As far as I can tell, in modern versions of IE, Firefox, Safari and Google chrome, all of those will render the background to be black so the user sees it change black before they are redirected to google.com in the above example. For some reason, Opera is not rendering the background to be black before redirecting to google (I'm sure it runs the javascript just before it since variables in my original code do get affected). Any ideas how I can get Opera to recognize the change and apply the affects before it goes to google I need this change to happen BEFORE the window.location is ran so I can't use onunload.
VIEWS ON THIS POST

130

Posted on:

Wednesday 21st November 2012
View Replies!

onclick and window.location doesn't work

The onclick contains this bank = confirm("Press cancel to go to the bank before you upgrade!");if(bank==true){window.location = "http://www.robowarsgame.com/beta199b/game/bios.php";}else{window.location = "http://www.robowarsgame.com/beta199b/game/bank.php";} The if/else works fine, it's the window.location that has trouble. It's inserted into the code by GreaseMonkey, but as I said, the if/else works fine, I tested them with alert(). So I'm thinking I did something wrong with the window.location
VIEWS ON THIS POST

138

Posted on:

Wednesday 21st November 2012
View Replies!

onclick troubles

I would help anybody can help me with this . I am not understanding the onclick fully. I am trying to have the onclick open to new window with those params.
VIEWS ON THIS POST

107

Posted on:

Wednesday 21st November 2012
View Replies!