[jQuery] Toggleing

[jQuery] Toggleing

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Toggleing</TITLE>
<META content="MSHTML 6.00.2800.1543" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=970023016-12072006><FONT face=Arial color=#0000ff size=2>Do I
need to resort to Javascript to make sure this ("#addCarr").slideUp("fast");
line triggers when the page first loads?</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com]<B>On Behalf Of </B>Acuff, Daniel (Comm
Lines, PAC)<BR><B>Sent:</B> Wednesday, July 12, 2006 11:29 AM<BR><B>To:</B>
jQuery Discussion.<BR><B>Subject:</B> Re: [jQuery]
Toggleing<BR><BR></FONT></DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff
size=2>Browsers can be so finicky... upon closing the browser and hitting the
page for the first time.. it really still only works after the page is further
refreshed another time.</FONT></SPAN></DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff size=2>I
will fail the first time...</FONT></SPAN></DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff size=2>I
also tried to hide the bottom div id by adding a line to the top of the
jquery:  $("#addCarr").slideUp("fast");</FONT></SPAN></DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff
size=2>$(document).ready(function(){<BR> $("#addCarr").slideUp("fast");<BR>  
$("#topLink").toggle(function(){<BR>      
$(this).html("Click here to show the original carrier
list.");<BR>      
$("#carrList").slideUp("fast");<BR>   
$("#addCarr").slideDown("slow");<BR>  
},function(){<BR>       $(this).html("Click here
if you do not see a carrier listed, and you want to request a carrier be
added.");<BR>      
$("#carrList").slideDown("slow");<BR>   
$("#addCarr").slideUp("fast");<BR>   });<BR>});</FONT></SPAN></DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff size=2>But
it too... only starts working after visiting the page and then hitting
refresh..</FONT></SPAN></DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff size=2>Any
ideas?</FONT></SPAN></DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=799592615-12072006><FONT face=Arial color=#0000ff
size=2>Thanks in advance!~</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com]<B>On Behalf Of </B>Acuff, Daniel (Comm
Lines, PAC)<BR><B>Sent:</B> Wednesday, July 12, 2006 11:22 AM<BR><B>To:</B>
jQuery Discussion.<BR><B>Subject:</B> Re: [jQuery]
Toggleing<BR><BR></FONT></DIV>
<DIV><SPAN class=083532115-12072006><FONT face=Arial color=#0000ff
size=2>This also was solved with Myles help.</FONT></SPAN></DIV>
<DIV><SPAN class=083532115-12072006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=083532115-12072006><FONT face=Arial color=#0000ff
size=2>Thank you again Myles.</FONT></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]<B>On Behalf
Of </B>Acuff, Daniel (Comm Lines, PAC)<BR><B>Sent:</B> Wednesday, July 12,
2006 11:18 AM<BR><B>To:</B> discuss@jquery.com<BR><B>Subject:</B> [jQuery]
Toggleing<BR><BR></FONT></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>Here I have created a DIV and a LINK (one of
the ones I want to toggle)</FONT> </P>
<P><FONT face=Arial size=2><div id="carrList">Quick Carrier Search:
<br /></FONT> <BR><FONT face=Arial size=2><input type="text"
size="60" id="searchtxt" onkeyup="searchSel()"/><br /></FONT>
<BR><FONT face=Arial size=2><br /></FONT> <BR><FONT face=Arial
size=2><select size="19" id="carrierList" name="carrierList"></FONT>
<BR><FONT face=Arial size=2><%=carrier_name%></FONT> <BR><FONT
face=Arial size=2></select></FONT> <BR><FONT face=Arial
size=2><br /></FONT> <BR><FONT face=Arial size=2><input
type="submit" value="Select Carrier"/><br /></FONT> <BR><FONT
face=Arial size=2></div></FONT> <BR><FONT face=Arial size=2><a
href="" id="topLink" title="New Carrier Request">Click here if you do
not see a carrier listed, and you want to request a carrier be
added.</a></FONT></P>
<P><FONT face=Arial size=2>The Jquery:</FONT> <BR><FONT face=Arial
size=2>$(document).ready(function(){</FONT> <BR><FONT face=Arial
size=2>   $("#topLink").toggle(function(){</FONT> <BR><FONT
face=Arial size=2>       $(this).html("Click
here to show the original carrier list.");</FONT> <BR><FONT face=Arial
size=2>      
$("#carrList").slideUp("fast");</FONT>
<BR>        <FONT face=Arial
size=2>   $("addCarr").slideDown("slow");</FONT> <BR><FONT
face=Arial size=2>   },function(){</FONT> <BR><FONT face=Arial
size=2>       $(this).html("Click here if
you do not see a carrier listed, and you want to request a carrier be
added.");</FONT> <BR><FONT face=Arial
size=2>      
$("#carrList").slideDown("slow");</FONT>
<BR>        <FONT face=Arial
size=2>   $("addCarr").slideUp("fast");</FONT> <BR><FONT
face=Arial size=2>   });</FONT> <BR><FONT face=Arial
size=2>});</FONT> </P><BR>
<P><FONT face=Arial size=2>I have a problem and a question:</FONT> </P>
<P><FONT face=Arial size=2>When I first load the page and click the jquery
anchor link: I think it goofs up because of the href = "" ??</FONT>
<BR><FONT face=Arial size=2>It displays a server error Directory Listing
Denied.</FONT> <BR><FONT face=Arial size=2>If I click the browser Back
button and do it again, the toggle starts working fine.</FONT> <BR><FONT
face=Arial size=2>What do I do differently to make it work the VERY first
time the page loads?</FONT> </P>
<P><FONT face=Arial size=2>The url has some asp querystring on it, but
that alone should not mess it up should it? It is like:</FONT> <BR><FONT
face=Arial size=2><A
href="http://cmsr76w1/SBDX/Scripts/Carrier_Request_Form.asp?channel=04.SC:%20Volume&carrier=ACUITY&lookup=nbcarrier1&item=9988">http://cmsr76w1/SBDX/Scripts/Carrier_Request_Form.asp?channel=04.SC:%20Volume&carrier=ACUITY&lookup=nbcarrier1&item=9988</A></FONT></P>
<P><FONT face=Arial size=2>I had a working example already using this
toggle at another site and it fires right every time that is why I am
wondering if the URL address *might* be messing it up?</FONT></P>
<P><FONT face=Arial size=2>Thanks.</FONT> </P><FONT
size=3><BR><BR>*************************************************************************<BR>This
communication, including attachments, is<BR>for the exclusive use of
addressee and may contain proprietary,<BR>confidential and/or privileged
information. If you are not the intended<BR>recipient, any use, copying,
disclosure, dissemination or distribution is<BR>strictly prohibited. If
you are not the intended recipient, please notify<BR>the sender
immediately by return e-mail, delete this communication and<BR>destroy all
copies.<BR>*************************************************************************<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></FONT></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/