codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Drop Down menu made viewable based on cookie  misslilbit02 at 15:59 on Thursday, June 24, 2010
 

I have these marketing campaigns running (like google adwords) and based on where a user comes from (google, yahoo, mns-bing, facebook) I have this referrer code passed that I collect out of the URL and I put a cookie on the user's computer based on what is included in this tag. OK so now I have to get the the cookie (which I know how to do) and based on if this cookie says website I need to show a drop down with sources for the user to choose from. That is my delimna. I typically code in PHP but this site wasn't developed by me so this cookie tracking was done in javascript. My issue is normally in PHP I can say if(referrer==website) then close off the php code and then go into the HTML but that doesn't seem to work for javascript. Can someone help me with this please?

What I"m doing is retrieving the cooking and now all I want to do is say if the cookie is website show this drop down menu. The code that is currently on the site is attached.

[CODE]<script>
function getCookie(c_name)
{

if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");

if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);

if (c_end==-1) c_end=document.cookie.length;


document.inquiry.referer.value = unescape(document.cookie.substring(c_start,c_end));
return false;

}
}


document.inquiry.referer.value = 'Website';


}

jQuery(document).ready(function() {

getCookie('referer');

});
</script>
[/CODE]

The drop down I want to show is:
[HTML]<select name=How_did_you_find_us>
<option value=''>Please Select</option>
<option value=Billboard>Billboard</option>
<option value=Direct Mail>Direct Mail</option>
<option value=Facebook>Facebook</option>
<option value=High School Presentation>High School Presentation</option>
<option value=Internet/Search Engine>Internet Search</option>
<option value="Magazine">Magazine</option>
<option value="MySpace">MySpace.com</option>
<option value="Newspaper">Newspaper</option>
<option value="Poster">Poster</option>
<option value="Radio">Radio</option>
<option value="Referral">Referral</option>
<option value="TV">TV</option>
<option value="Yellow Pages">Yellow Pages</option>[/HTML]

  insert datepicker on each row  anvikon at 22:08 on Thursday, June 24, 2010
 

I want the datetimepicker on ecah row on the table

If I give the unique Id in the jsp page and js, the cursor still pointing to only prev textbox.


Here is the detail code:

the below is the html code



<html:text property="DateTime" size="18" styleClass="maincontent1" value="" /><a href="javascript:NewCssCal('DateTime','yyyymmdd','arrow',true,24,false);"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date"> </a


For the above code I need to add a date picker for next row.


I did like below.



Var iarr = ā€˜Date Timeā€;

Count = 0;

oCell.innerHTML = "<input type='text' name='"+iarr+"' id='"+iarr+"' size='18' class='maincontent1' ><a href=javascript:NewCssCal(\"" +iarr+ "\",\"yyyymmdd\",\"arrow\",true,24,false)><img src='images/cal.gif' width='16' height='16' border='0'alt='Pick a date'> </a> ";



count = count+1;

iarr = iarr+ count;

oCell = newRow.insertCell;
With the above code the cursor control pointing to the previous.






Do you have any solution for this? Please let me know


thanks


  Re: Drop Down menu made viewable based on cookie  kalish88 at 10:37 on Monday, August 30, 2010
 

Once produced the cookies they appear to be warm and tasty but thats not it!
you will then need to protect the cookies with all your might from the evil cookie monster who will come once he smells them cookies IF you succed in protecting your cookies you may eat in content BUT if you fail then you will die and have all you cookies eaten by the fiend.
======================
Breast Enhancement Cream | Breast Enhancement Pills








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: need help creating mysql database for my java code
•  Water volume
•  Solr- New face of Search
•  Re: Insert Contents of .txt file into a .html page
•  Re: changing a forms value
•  Re: insert datepicker on each row
•  Re: Drop Down menu made viewable based on cookie
•  Re: Need Javascript Multiple sidebar menu with sliding effects
•  Re: IsDate() in JavaScript?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010