Jump to content

Vantskruv

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Vantskruv

  1. You can create cookies using javascript to store the variables......example of how to create, assign value and delete cookieshttp://www.quirksmode.org/js/cookies.html
    Thanks for the reply. Though at this moment I succeded without using cookies. :) I created two frames. I did save the variables at the frame source-page and then accessed the variables from the frame-pages. Very simplified example:
    //In bottom framevar radioButtons = top.frames['main'].document.getElementById("RadioButtons")if(radioButtons){	for(i=0; i<radioButtons.length; i++)	{		if(radioButtons[i].name == "RadioQuestion")	{							if(radioButtons[i].checked) 		{			//sao_user_answer and currentQuestion are my define global variables at		//my frame-source page		parent.sao_user_answer[parent.currentQuestion] = radioButtons[i].value		parent.currentQuestion++		break		}//if	}//if	}//for}//if

  2. SOLVED!Hi!I'm creating a special webpage with a question for each page.I've made .js file where I create variables, e.g. var user_answer or var currentQuestionI want these variables to be stored when I reloading the page for the next question. But I don't get it to work, because when I'm reloading the page all the variables is reinitialized. So what is the best way to save information when a user is reloading the page, or the page is automatically reloaded? I've tried to write a script that write's the page all over again but it seems it doesn't works so well with the javascript, or am I making everything wrong. I have a big sample at my homepage, I guess it's very hard to read but I put it up anyway if you are curios. :)http://hem.bredband.net/b308144

  3. In HTML-code I use cellspacing and cellpadding like this:

    <table cellspacing="0" cellpadding="0"></table>

    I get the same results in CSS when coding like this:

    table {	margin: -1px;	padding: -1px;}

    What troubles me is it really legable to add a negative value in the margin and padding variables in the CSS-coding? Does this CSS-code really act exactly the same way as the HTML-code?/VantskruvEdit: Note that when using values 0px instead of -1px in the CSS-code the result will be different than the HTML-code.

    • Like 1
×
×
  • Create New...