Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3407806
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:47:47+00:00 2026-05-18T05:47:47+00:00

I have a link on the page which when clicked opens up a thick-box

  • 0

I have a link on the page which when clicked opens up a thick-box window with Ajax modal login content. What is odd is that if I remove the alert(''); the next jquery line of code does not work. $('#logintest').before('<input type="hidden" value="' +st+ '" name="ReturnTo">');

If the alert(''); is there the hidden input is added to the thickbox modal window before the input with the id of “logintest” as it should.

I haven’t been able to figure out why, anyone?

Here is the code on the main page

<a class="login_links" id="myaccount" href="/myaccount.asp">My Account</a>

<script type="text/javascript" language="javascript">
$(function(){
$(".login_links").click(function(){   
var t = this.title || null;
var s = $(this).attr("href");
var g = this.rel || false;
var l = '/v/AjaxLogin.asp?height=100&width=300&modal=true'
tb_show(t,l,g);
var st = s.substr(s.lastIndexOf("/") + 1);
alert('');
$('#logintest').before('<input type="hidden" value="' +st+ '" name="ReturnTo">');
return false;
});
});
</script>

And here is the code on the ajax page

<div style="text-align:center ">
<form action="/login.asp" method="post" name="loginform">
<table border="0" cellpadding="3" cellspacing="3" style="margin:0 auto;">
<tr>
    <td>Username:</td>
        <td><input type="text" maxlength="75" size="30" value="" name="email"></td>
</tr>
<tr>
        <td>Password:</td>
        <td align="left"><input id="logintest" type="password" maxlength="20" size="20" name="password"></td>
</tr>
<tr align="right">
        <td colspan="2"><input type="submit" value="Login">&nbsp;<input type="submit" id="cancel" value="Cancel" onclick="tb_remove();return false;"></td>
</tr>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:47:48+00:00Added an answer on May 18, 2026 at 5:47 am

    Ajax loading is asynchronous. The reason its not working without the alert is because the html from the ajax request hasnt been appended to the dom yet. You need to move that code to the success callback. Im not sure if TB provides for that or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wish to have a link which opens popup when clicked however I wish
On this page I have a link to a google map which opens in
I have a page with a Print link that takes the user to a
I have a link that I dynamically create which looks something like the following:
I have an html page. On that page I want to open popup window.
I have a login.jsp page which contains a login form. Once logged in the
I have a master page, with a help link in the top menu. This
Here's my scenario: I have a page containing several links; each link is meant
I have a link in a pdf-document (PDF1), which is embedded in a browser
I have a user profile page on my web app which has contact information.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.