![](http://content.invisioncic.com/r49260/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Chocolate570
-
Posts
1,550 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Posts posted by Chocolate570
-
-
You can do that with cookies. If you'd really like, I can make it so that when it's got a background, it sets a cookie with it's value to the background. The next time it opens the page, it checks if the bg image it's supposed to put is not in the cookie, meaning it's different from last time. Do you want that?And my god, my php worked. I can't believe it. This really is amazing to me
-
What do you mean, google front end? They don't have one, at least for their plain search engine. It's a picture, a box, and a couple of links & buttons. If you can't pass validation on that... :|
-
Image in CSS
in CSS
Moving to CSS section...
-
Ok. Got it. :)Rename your page to pagename.php, first of all.Next, put this in the head section, AFTER the CSS.
K, you know how bad I am at php. So try that out.<?php$randthing = rand(1,max number here);#Where it says max..., put the last number that can be included. 1,20 means #a number between 1 and 20, AND including 1 and 20. switch($randthing){ case "1": $finstyle="url of first image"; break; case "2": $finstyle="url of second image"; break; case "3": $finstyle="url of third image"; break; #Ok, you get the idea. Continue with that format until done. default: exit("OMG IT DOESN'T WORK LOLOLOLOL"); #K, put the message that displays if it doesn't work there. break;}$omgfirst='<style type="text/css">body{background-image:url(';$omglast=');}</style>';echo $omgfirst.$finstyle.$omglast;?> -
I'll put together a php script then. Give me a sec.
-
One sec, i'll put a script together.
<script type="text/javascript">x=new Array();x[0]="image one"x[1]="image two"//keep going, you get the idea.random = Math.floor(Math.random()*x.length);startTep='<style type="text/css">body {background:url('+x[random]+');}</style>'document.write(startTep);</script>
Does that work?
-
I think that's part of the image.
-
They've just left the name attribute around because old browsers don't parse id. But, ID is supposed to be used now.
-
Pollux is correct. PHP does not know what type of element it is retrieving info from. But this is how to do it. Beware---the user has to click a submit button for it to work.
<form method="POST" action="the current php page you're on"><input blahblahblah name="daaaa"><input blahblahblah name="LOLOLOL"><input type="submit" value="OMG"></form><?php$da = $_POST['daaaa'];$lol = $_POST['LOLOLOL'];echo $da.$lol;?>
-
No, sorry, this is not possible.
But there are alternatives, such as not using a prompt box.
-
Webbuilders handle both.
-
As in, if you copy the code into a page by itself, it works.
-
When you put the script in a seperate window, it works perfectly. And as a coincidence, a friend of mine just designed a blog system. It's very simple to set up. I could ask him to give the code to you?
-
You can only do it with javascript, from what I know. Well, there are some readymade scripts for it---check the menu section of Dynamic Drive. Basically, most of them use CSS and javascript in collaboration, meaning dHTML.
-
It's probably within a form called 'login'. :)What it does is passes the value of the form element to a new page.
-
Well, I know how I've learnt alot---by looking around. All sites are compilations of other sites, remember that.
-
One of the longest running tv series' in the world. It's like star wars---except it's set in the future, and they're on this ship, and they fly around, saving people. Klingon is a type of race in that series. They speak..klingon.
-
He's right, read the tutorials, but your example is wrong, real.This is the code:
<script type="text/javascript">var url="put the url of the website you wanna go to"var yesorno=confirm("Wanna go to another site??")if(yesorno==true){window.location=url}</script>
-
You're using firefox, I bet. It auto-searches for a site that matches the name of your 404---and takes you to microsoft.com half the time. Ironic, no?:ph34r:
-
First michael, add this to the tag that, when mouseovered, should bring up the pop up:
onmouseover="popUp()"
Then, put this in your head section:
<script type="text/javascript">function popUp(){window.open("somepage.html", "windowname", "width=300, height=150");}</script>
And remember to edit the window.open() function. Hope that helps!Choco
-
Also, the javascript won't work unless you call it---add a onchange="getOption()"to the select box.
-
Too complex, man. Just use the eval() function.
numberfinal=eval("number1+number2");
Will give you 200.Also, you could use
number1+=number2
which will add number1 and number 2 and put the answer in number1.
-
I think for a project like this, we'd need 10 people. Also, I think that we shouldn't do every language available, just major ones--javascript, CSS, ASP, SQL, HTML, PHP, and that sort of thing. Otherwise, doing the... 40+ language tutorials available on W3S would take FOREVER.
-
Hacknsack, it's official. You are the master of javascript. :)Thanks so much. It worked like a charm!
Basic Calculator in JavaSript
in JavaScript
Posted
Here's a calculator I made, if you'd like to look through it. I made it a couple months ago. It was on page 14 of the javascript forum.![:)](//content.invisioncic.com/r49260/emoticons/default_smile.png)