Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 532 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

AJAX Masters....help me!

Thread title: AJAX Masters....help me!
Closed Thread    
    Thread tools Search this thread Display Modes  
04-02-2006, 08:48 PM
#1
sskhalsa is offline sskhalsa
Status: Member
Join date: Mar 2006
Location: New York City
Expertise:
Software:
 
Posts: 371
iTrader: 2 / 100%
 

sskhalsa is on a distinguished road

  Old  AJAX Masters....help me!

say I have the following form for a newsletter script:

Code:
<table " cellspacing="0" cellpadding="0">
	  <tr>
		<form action="http://www.domain.com/users/form.php?FormID=6" method="post" name="frmSS" onSubmit="return CheckSS()">
		<td height="20" bgcolor="#FFFFFF" colspan="2">
		  <p style="margin: 7"><font size="2" color="#000000" face="Verdana"><b>Sign-Up Today!</b></font></p>
		</td>
	  </tr>
	  <tr>
		<td bgcolor="#FFFFFF" valign="top">
			<p style="margin: 7"><font size="1" face="Verdana"><font color="red"><b>*</b></font> Your Email Address:</font>
	   </td>
		<td bgcolor="#FFFFFF" valign="top">
			<p style="margin: 7"><font size="1" face="Verdana">
			<input type="text" style="font-family: Verdana; font-size: 8pt" name="Email" size="30"></font>
	   </td>
	  </tr><input type="hidden" name="SelectLists[1]" value="YES">
				  <tr>
					<td bgcolor="#FFFFFF" valign="top">
						<p style="margin: 7"><font size="1" face="Verdana"><font color="red"><b>*</b></font> Preferred Format:</font>
				   </td>
					<td bgcolor="#FFFFFF" valign="top">
						<p style="margin: 7"><font size="1" face="Verdana">
							<select name="Format" style="font-family: Verdana; font-size: 8pt">
								<option value="0">Text</option>
								<option SELECTED value="1">HTML</option>
							</select>
					  </font>
				   </td>
				  </tr>

<input type="hidden" name="FormCode" value="b06a89ee1626bb2bfb1026d7a051e740">
			  <tr>
				<td bgcolor="#FFFFFF" valign="top">
			   </td>
				<td bgcolor="#FFFFFF" valign="top">
					<p style="margin: 7"><font size="1" face="Verdana">
					<input type="submit" style="font-family: Verdana; font-size: 8pt" value="Subscribe"><br>&nbsp;</font>
			   </td>
			 </form>
			  </tr>
			</table>

			<script language="JavaScript">

				var numLists = 1;

				function doCheckCount(ccObj)
				{
					if(ccObj.checked)
						numLists = numLists + 1;
					else
						numLists = numLists - 1;
				}

				function CheckSS()
				{
					theFrm = document.frmSS;

					hasDot = theFrm.Email.value.indexOf(".");
					hasAt = theFrm.Email.value.indexOf("@");

					if(hasDot + hasAt < 0)
					{
						alert("Please enter a valid email address.");
						theFrm.Email.focus();
						theFrm.Email.select();
						return false;
					}

					if(numLists == 0)
					{
						alert("Please choose a mailing list to subscribe to.");
						return false;
					}
					
					return true;
				}
			</script>
How can I go about "AJAXING" that so the page it is on will not have to reload?

04-02-2006, 10:06 PM
#2
freedom is offline freedom
freedom's Avatar
Status: Request a custom title
Join date: Dec 2005
Location: LIC (NYC), NY
Expertise:
Software:
 
Posts: 1,026
iTrader: 0 / 0%
 

freedom is on a distinguished road

  Old

Learn about XMLHTTPRequest.

04-02-2006, 10:13 PM
#3
Barbaro is offline Barbaro
Barbaro's Avatar
Status: Member
Join date: Feb 2006
Location: Omaha, NE
Expertise:
Software:
 
Posts: 452
iTrader: 1 / 100%
 

Barbaro is on a distinguished road

  Old

Learn Javascript first....

04-02-2006, 10:20 PM
#4
freedom is offline freedom
freedom's Avatar
Status: Request a custom title
Join date: Dec 2005
Location: LIC (NYC), NY
Expertise:
Software:
 
Posts: 1,026
iTrader: 0 / 0%
 

freedom is on a distinguished road

  Old

I think it's safe to assume that he knows JS seeing as there's a little JS in the middle of the script.

04-03-2006, 02:15 AM
#5
sskhalsa is offline sskhalsa
Status: Member
Join date: Mar 2006
Location: New York City
Expertise:
Software:
 
Posts: 371
iTrader: 2 / 100%
 

sskhalsa is on a distinguished road

  Old

nah i know nothing, that was just auto generated

04-03-2006, 02:37 AM
#6
freedom is offline freedom
freedom's Avatar
Status: Request a custom title
Join date: Dec 2005
Location: LIC (NYC), NY
Expertise:
Software:
 
Posts: 1,026
iTrader: 0 / 0%
 

freedom is on a distinguished road

  Old

Then .. learn JS.

04-03-2006, 02:22 PM
#7
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

You have two options.
  1. Learn JavaScript (and a server-side language of your choice, application construction, http protocol, etc, etc, etc)
  2. Hire someone to do it for you

04-20-2006, 11:36 AM
#8
echoSwe is offline echoSwe
Status: Member
Join date: Jul 2005
Location:
Expertise:
Software:
 
Posts: 185
iTrader: 0 / 0%
 

echoSwe is on a distinguished road

  Old

The question is flawed from the start - a newsletter page isn't reloaded!

Also you could learn about proper HTML coding - without font-tags, huge tables etc.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed