Jump to content

MrAdam

Members
  • Posts

    489
  • Joined

  • Last visited

Everything posted by MrAdam

  1. it will try opening them with the same name, i think that's why it wouldn't work. try something like: function openWins() {var toOpen = 5;var i = 0;while (i < toOpen) { window.open('myFile.html', i); i++;}}
  2. MrAdam

    Login Script

    people could still right click, see .. src="file.js" .. open the script and find the password. - glad the link came in useful btw
  3. MrAdam

    Login Script

    [quote name='The master' post='53392' date='Jan 1 2007, 06:59 PM']No with javascript u can't make a page that is only viewable by that member, for that section u should be with PHP.I dont know that language.But u can make a prompt box that brings the user to another pagewith a sort of passwordlike [html]<script type="text/javascript">function pass(){var pass= prompt ("pls enter the password","***")var mypass = "hello"if (pass==mypass){document.location="http://www.....")}</script>[/quote]users viewing the page could easily find the password by viewing the source - completely unsafe.and yes.. you will need to learn PHP/MySQL .. [u][color="#800080"][url="http://www.php-mysql-tutorial.com/"]http://www.php-mysql-tutorial.com/[/url][/color][/u]
  4. a working alternate:java script: function openmenu() { var obj = document.getElementById('jobdesc'); obj.innerHTML = 'Job Description'; obj.href = 'why.htm';} html: <td class="menu" onmouseover="openmenu()"><a id="jobdesc" href="jobdescription.htm">Job Description</a></td>
  5. in: $result = mysql_query ("SELECT * FROM dictionary WHERE word") or die(mysql_error()); ..."word" has no value. you need to replace it with: $result = mysql_query ("SELECT * FROM dictionary WHERE word='{$search_string}'") or die(mysql_error());
  6. MrAdam

    PHP instalation

    if it's installed correctly, you should just use the normal way to insert the php scripts ( http://www.w3schools.com/php ), and then access it on your computer by typing into the browser address:http://localhost/myfile.php
  7. MrAdam

    Logo ideas

    ahh yes ! looks good ! and yeah i know "something to do with mercedes" .. i'll give the outline idea a go !
  8. MrAdam

    Logo ideas

    Im building a website for a friend's company; the website is to sell mercedes model cars. im currently designing the website .. i've got a good template, but need a good logo. so far the colour scheme is dark blues and white. im not asking for someone to design me a logo, just for some ideas. i've created a few but didn't like any of them.
  9. you might also want to get into the habbit of writing: <script type="text/javascript" src="jstext.js">
  10. MrAdam

    Web Spider

    try: http://phpdig.net/
  11. have you got a link or your code you could post?
  12. MrAdam

    Empty a session?

    ohh. session_destroy() has no parameters, using it will only remove YOUR session.to remove everybodies sessions .. you could create a piece of code within your script that reads a variable from either a config file or a database, for example: <?phpsession_start();// read from file or databaseif ($log_users_out==true) { session_destroy();}// rest of script?> that MAY work, i'm not sure. I've never tried anything like it.
  13. i know they use iframes to project the formatted code .. and that they are known as "WYSIWYG" text editors. try googling WYSIWYG, you'll probably find a tutorial or script you can modify.
  14. MrAdam

    Empty a session?

    you should use... session_destroy() that will completely destroy the session and effectively log out your users.having... <script LANGUAGE="JavaScript">window.location=index.php;</script> ...will automatically redirect the user, no matter wether there's a submit button or not. if you're wanting to only redirect your users when they click a button, you need to create a function, and run that function when the user clicks the button. if you are just wanting to automatically redirect a user, i'd use PHP: Header("Location: index.php"); most likely more reliable than javascript.
  15. for each link a different random colour: function changecolor(id) { var links = new Array(); links = document.getElementsByTagName("a"); for (i=0;i<backgroundcolors.length;i++) { var number = (Math.floor(Math.random()*215)); links[i].style.backgroundColor=backgroundcolors[number]; }} for each link the same random colour: function changecolor(id) { var links = new Array(); links = document.getElementsByTagName("a"); var number = (Math.floor(Math.random()*215)); for (i=0;i<backgroundcolors.length;i++) { links[i].style.backgroundColor=backgroundcolors[number]; }} i've not tested them, but they should work !
  16. MrAdam

    ask adivice

    i don't think that's from a website, looks more like part of a program. to create something similar on a website, learn HTML for layout, CSS for styling and either PHP or ASP +MySQL for querying the database.
  17. i use "xAMp" ... http://www.google.com/search?hl=en&lr=...s=en&q=xamp
  18. i don't think the foot colours go together...
  19. erm, i reckon you'd need to use javascript and create an array of the songs and of the song times. then write a script to run a song after the time runs out on the previous.do you know ANY javascript?
  20. that's actually "ASP, JavaScript" and i don't think you can do that in PHP as far as i know. the closest you could get is dynamically writing out the header at the start of the page.
  21. try laying the script out more simple: java script:R=0;x1=.1;y1=.05;x2=.25;y2=.24;x3=1.6;y3=.24;x4=300;y4=200;x5=300;y5=200;DI=document.getElementsByTagName("img");DIL=DI.length;function A() { for(i=0; i-DIL; i++){ DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"; } R++}setInterval('A()',5); void(0); it uses HTML DOM .. so that's probably why you don't see many of the commands you learnt.i'm guessing with it starting with "java script:" it's being stored in the element (eg. ....onclick="java script:R=0.....") so you will have to keep it as you have it now.
  22. try using: ;<input type="button" name="S1" value="Find distance" onclick="distance()" />
×
×
  • Create New...