close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

blind and fade, then go to URL

Thread began 4/14/2009 12:02 pm by missbrashaw307820 | Last modified 12/04/2009 6:57 am by Ray Borduin | 6803 views | 6 replies |

missbrashaw307820

blind and fade, then go to URL

Hello,
I am quite new to JS...
What I want to accomplish is when a link is clicked it activates
spry blind and fade
and THEN the go to URL.
So, is there a way to delay the link function?
If it blinds for 1000ms and simultaneously fades at 800ms,
I want the link to occur at 1000ms

I found a site that does this (hallassociates.ca/) and used SiteImport to examine their javascript
but it is above my comprehension...

Thanks!
Donovan

Sign in to reply to this post

Justin Nemeth

Sounds like you can use the setTimeout() function. That will allow you delay execution for your url redirect. You probably want something like this:

//your blind and fade code

setTimeout('urlFunction', 1000);



That would wait 1 second (1000 milliseconds) then call urlFunction(). For more info check out this: js_timing.asp

Sign in to reply to this post

missbrashaw307820

makes sense, but...

I have fiddled around with adding that code and it still does not seem to work.
Here is the example i am messing with (only has blind, no fade)



-->
</style>
<script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_effectBlind(targetElement, duration, from, to, toggle)
{
Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body class="oneColFixCtr">

<div id="container">
<div id="mainContent" onclick="MM_effectBlind(this, 1000, '100%', '0%', false);MM_goToURL('plugins/parent','index.html');return document.MM_returnValue">
<h1> level heading </h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</p>
<!-- end #mainContent --></div>
<!-- end #container --></div>
</body>
</html>


where do I add it?

thanks!

Sign in to reply to this post

Ray BorduinWebAssist

onclick="MM_effectBlind(this, 1000, '100%', '0%', false);setTimeout('MM_goToURL(\'parent\',\'index.html\')',2000);return document.MM_returnValue"

Sign in to reply to this post
Did this help? Tips are appreciated...

missbrashaw307820

Awesome!

thank you so much!
works perfect!

I love the WA forums. I started from scratch and have learned so much!

thanks again!

Sign in to reply to this post

gruant2000381341

set on text links

this is pretty neat, I followed the posts above and got one working. How can I apply this to a text link, so I can have a few different links on the same page. Example clickk here to go to page r and click here to go to page j. Then when clicked, I will get the blind effect and redirection to the coresponding page

I have tried to copy the code and apply it to a href tag but that didnt work. Any ideas?

<a href="#"onclick="MM_effectBlind(this, 1000, '100%', '0%', false);setTimeout('MM_goToURL(\'parent\',\'index.html\')',1500);return document.MM_returnValue" >

Sign in to reply to this post

Ray BorduinWebAssist

maybe try:

<a href="javascript:MM_effectBlind(this, 1000, '100%', '0%', false);setTimeout('MM_goToURL(\'parent\',\'index.h tml\')',1500);return document.MM_returnValue" >

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...