Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

7on

macrumors 601
Original poster
Nov 9, 2003
4,939
0
Dress Rosa
I'm using the "Effect.BlindDown('id'); return false;" on a page and it's working great. onClick and everything shows once it's clicked (the div is "display:none").

The question is, "How do I get the Effect to enable from a link from another page."

I have a button on the home page that when the visitor clicks it and takes them to this page I want the hidden content visible. Any other time I want it to be hidden when the visitor pops up. Is there anything I can add to the button's (it's an image) <a> tag that will call a javascript call from the address bar?

Something like <a href="www.website.com/jobs.html?javascript:Effect.BlindDown('id'); return false;">

That doesn't work as I've tried it, but is there a way to get what I'm asking for? Thanks!
 
I think I almost got it...

I'm making the link be www.website.com/jobs.html#jobs

and on the jobs.html page I put

Code:
<script type="text/javascript">
if ((location.hash.substring(1)) = ('jobs'))
Effect.BlindDown('id'); return false;
</script>

Still working with the semantics... don't think I have it written correctly...
 
From what I've read, this code should be working...
but it's not. Could someone help me with it? Thanks!

Code:
<script type="text/javascript">
if (window.location.hash.substring(1)=="jobs"){
Effect.BlindDown('id');
}
</script>
 
I got it to work,

Code:
<script type="text/javascript">
if (window.location.hash.substring(1) == "jobs"){
window.onload = function () {
	new Effect.BlindDown('id');
}}

</script>

The big issue I was dealing with is the ASP guys down stairs have a <body onLoad="bodyOnload();">... removing that made my code work... but I don't know how get the two to co-exist... hmmmmm


EDIT:Looked up onLoad="bodyOnload();" and it doesn't actually do anything because the () are empty. I just went ahead and deleted it.
 
The effect is out live if anyone wants to see it.

http://www.favoritestaffing.com/
Click on the "banner/button" below the tables to see the effect and just click on the "jobs" button to see how it differs.

Sidenote: If there are any critiques that'd be nice. I don't think I'd be able to do anything as this site is firmly in the hands of the managers and VPs (I'm basically a Photoshop/Code monkey :( )
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.