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
Highlight a row in a table from an external web page
Old 04-13-2009, 11:16 PM Highlight a row in a table from an external web page
Novice Talker

Posts: 6
Name: Mark Mawson
Location: hull
Trades: 0
Hi,
I am not sure if Java if the answer as some people have java disabled on web pages.
I am in the middle of changing my web site using CSS and straight html.
I want to change a row in a table here
http://amdivers.co.uk/AM%20Divers%20...AMDPrices.html

from say here
http://amdivers.co.uk/AM%20Divers%20...ESTWeb/AD.html
I want the individual adventure dives row to be some how highlighted.

if they come from here
http://amdivers.co.uk/AM%20Divers%20...STWeb/MSD.html
I wante Master Scuba Diver row to be highlighted.

I was going to try and set a class with CSS from the AD page or MSD page or what ever page they come from, but I dont know how to change a table style so its unquie esp if they Just come from the
http://www.amdivers.co.uk/AMDivers_S...rses_Hull.html

I want no highlights to occur.
Can someone point me in the right direction please
mrowsi is offline
Reply With Quote
View Public Profile Visit mrowsi's homepage!
 
 
Register now for full access!
Old 04-14-2009, 10:48 AM Re: Highlight a row in a table from an external web page
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
First, Java is not JavaScript.

Second, if your users can get by without the behavior you indicated, it is ok to use JavaScript even though it can be turned off.

Third, you can't use JavaScript to manipulate ANYTHING on an external page. There is a strict same origin policy.

Fourth, I'm not sure I understand your question, because your title doesn't seem to follow with the rest of your question.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 04-14-2009, 09:06 PM Re: Highlight a row in a table from an external web page
Novice Talker

Posts: 6
Name: Mark Mawson
Location: hull
Trades: 0
I have solved the problem after a bit of surfing, I have added this to the prices page
<body>
<script type="text/javascript">
window.onload=function() {
if(location.hash) {
document.getElementById(location.hash.substring(1) ).parentNode.style.backgroundColor='yellow';
window.parent.location ="#TOPPAGE"; }
};
</script>
<a name="TOPPAGE"</a>
And a link on the other pages with a #AD or #AOW or #Dry etc depending on which page they came from and the results can be seen from
http://amdivers.co.uk/AM%20Divers%20...STWeb/MSD.html
Just click on Price List Link
or
http://amdivers.co.uk/AM%20Divers%20...iversHull.html
Etc.
mrowsi is offline
Reply With Quote
View Public Profile Visit mrowsi's homepage!
 
Reply     « Reply to Highlight a row in a table from an external web page
 

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.12092 seconds with 12 queries