Jump to content

Chocolate570

Members
  • Posts

    1,550
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Chocolate570

  1. First of all, add this to your body tag:onload=timeLog()Add this to your head section:

    <script type="text/javascript">function changeLog(){ur=(url of login page here)window.location=ur}function timeLog(){x=(put time in milliseconds of time out here)var logTime=setTimeout(changeLog,x)}</script>

    That should work. But be warned: the person can, at most cases, just press the forward button and log in again. Unless you have something complex running on your server. But in any case, try it out, and see if it works for you. :)

  2. Rawr! I will now eat you!(Just Kidding :))Welcome to the forums, hope you have a great time.Now, to address your questions. Any tag you put in the head section you can put into the body section too. The only problem is the head section loads first, causing your page to look funny if the title tag doesn't take effect until the whole page is loaded. So you can put style tags into the body section with php. :)Also, you can have more than one head section or body section. I don't know if the validator will like it, but it sure will work. :(

  3. Yes, I don't think this is going to work with HTML. You'll have to create an image. And for image mapping, my free paint software has a plugin where you draw the map over an image, and then it'll make the code and give it to you. :)

  4. So, i'm helping a person with their forum. Everything's great except for one thing: The bbcode inserting function doesn't work in firefox. I think I have discovered the problem, it's the document.selection. From what I remember a long time ago, that's an IE only method. Correct? So I need to figure out how to make the function work cross-browser. I have also learnt that document.getSelection() works cross-browser, but how to integrate it? And do you see any other problems with this code? Thank you very much.This is the function that inserts the bbcode into the post box with the attribute name set as "post".

    function createlist(){  f1.post.focus(); var selected = document.selection; var srange = selected.createRange(); srange.colapse; if(srange.text=="") alert('There is no text selected to format'); else { nq=srange.text.split("\n").join("\n[*]"); srange.text="[*]" + nq; }} function LBC(func){  f1.post.focus(); var seected = document.getSelection; var srange = selected.createRange; srange.colapse; var nq=srange.text; if(srange.text=="") alert('There is no text selected to format'); else { switch(func) {case 'b':nq="[b]"+srange.text+"[/b]"; break;case "i":nq="[i]"+srange.text+"[/i]"; break;case "u":nq="[u]"+srange.text+"[/u]"; break;case "img": nq="[img="+srange.text+"]; break;case "q":nq="[QUOTE]"+srange.text+"[/QUOTE]"; break;case "c":nq="[CODE]"+srange.text+"[/code ]"; break;case "url":nq="[url=http://"+srange.text+"]"+srange.text+"[/url]"; break; } srange.text=nq;}}f1.name.focus();

    Thank you very much in advance.<Chocolate570>

×
×
  • Create New...