Jump to content

utahcon

Members
  • Posts

    13
  • Joined

  • Last visited

utahcon's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Can you set a cookie with javascript and then read it with PHP and vice versa?I can't think of any reason you couldn't?Thanks!
  2. b = 'This rocks!'a= 'What rocks?'c = doThis(ab)function doThis(ab){ c = ab return c}document.write(c) would the output be 'What rocks? This rocks!'?
  3. utahcon

    ? and :

    what does this mean? var w = (variable && variable2) > 0)?varaible3:variable4,v=w.split("&")
  4. How far back does that run? How does it move up the levels? As I see it it would just return the same results over and over, probably in an infinite loop.
  5. I am trying to determine the how my page is called, and I know I can use document.referrer, but I am getting mixed results when my site is framed.What I would like to do, and it may not be the best way (I am open to suggestion) is loop up through parent.document.location (or parent.document.referrer) and capture that information.How can I loop through this? I have tried making a loop to write out parent.parent.document. for as many as there are, but it isnt doing this properly.Can you help?
  6. I have a script that will keep posting a new post whenever it is pulled in from the DB, however I want it to animate (slide down) when a new post is made.Here is what I have:http://66.93.225.214:8080/blog/ajax.htmlHow can I make that animate in?
  7. utahcon

    AJAX issue

    I am looking through the w3c's guides on AJAX and I found this*** sorry I think I should reword the question *** var xmlHttpfunction showHint(str){if (str.length==0){ document.getElementById("txtHint").innerHTML=""return}xmlHttp=GetXmlHttpObject()if (xmlHttp==null){alert ("Browser does not support HTTP Request")return} var url="gethint.asp"url=url+"?q="+strurl=url+"&sid="+Math.random()xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url,true)xmlHttp.send(null)} function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("txtHint").innerHTML=xmlHttp.responseText } } function GetXmlHttpObject(){ var objXMLHttp=nullif (window.XMLHttpRequest){objXMLHttp=new XMLHttpRequest()}else if (window.ActiveXObject){objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")}return objXMLHttp} Couldnt I call a function like callPHP(), that would pass the needed URL into the functions above and have it return the value of xmlHttp.responseText?I am not having any success in doing so...
  8. actually no, I am using Fx, but I will try it anyways.
  9. I know you can use javascript to fetch data from a php/perl script and return the results without having to reload the page. Can you do something like this though? (sorry for the bad examples)the user calls the page and is returned 2 posts, the two posts are shown below... ====| || |++++| || |++++then when the javascript checks for new posts build the new post above the first and slide the rest down? ==== represents the top of the page1)====| || |++++| || |++++2)++++| || |====| || |++++| || |++++3)++++| |====| |++++| || |++++| || |++++4)====| || |++++| || |++++| || |++++Again sorry for the lame example...
  10. I apologize if this is the wrong place for this question, I am a newbie, but I didnt see a specific forum for DHTML/AJAX so I figured JavaScript was the next place to look.I am having problems with my style control.I have set in my CSS #loginForm {display: block;}#blog {display: none;} and in my js function toggleDiv(divName){ alert(divName + " is " + document.getElementById(divName).style.display) if(document.getElementById(divName).style.display == 'block'){ document.getElementById(divName).style.display = 'none'; } else { document.getElementById(divName).style.display = 'block'; }} when the function runs nothing is brought up for the document.getElementById(divName).style.displayam I missing something?I have also tried document.getElementById(divName).style.display.valuewhich gives me nothing.
×
×
  • Create New...