i think i write it a bit too .. confusingly lol heres a link to the less complicated version:
http://www.daniweb.com/forums/post387701.html#post387701
Max
i think i write it a bit too .. confusingly lol heres a link to the less complicated version:
http://www.daniweb.com/forums/post387701.html#post387701
Max
Hi,
How do i check for a cookie using javascript, and then say if the cookie is found, write "this" or if the cookie is not found, write "that"?
Thanks,
Max Mumford.
Hi,
Im making a website which has a login system where if the user is logged in (cookie found) it displays extra buttons in the menu, and i was thinking we could use a document.write script which uses a function that checks if the logged in cookie is present or absent, and then "writes" the appropriate menu buttons.. i can do html scripting but not javascript or php, and was wondering what would need to be added to out login script so it wrote a cookie to their computer, and that when the user loads a page, the javascript checks for the cookie. I need the php script and the javascript script.. thanks :)
Max Mumford.
great, works a treat, thanks :)
Hi,
How do I change the value for a field in my form when sombody clicks in that field?
for example i have a field for "name" and it should say "name" in it, but when you click in it the value changes to nothing.
Thanks,
Max Mumford.
i wanted a link that opened a new window on another page, and sent the first page back to the home page
don't worry, iv figured it out:
href="[URL]http://swmassive.forum5.com/[/URL]" target="_blank" onclick="parent.parent.location.href='http://www.swmassive.co.uk'"
Hi,
How do I make it so when I click a link on page A, it opens page B in a new window, and page A goes to a specified page?
This is the page:
http://www.swmassive.co.uk/forums.html
I want to make it so when the user clicks view, the forums page goes back, and it opens the hyperlinked page in a new window, so the user is left with 1 window with the actual forum in, and another page with our homepage in.
Thanks,
Max
Hi all,
Im doing my myspace profile and im using submit buttons in a form and the form action as the url for the page that the user gets taken to, however my external links dont work, and i also want them to be opened in a new window. How can i do this?
This is the current code for a link to my website:
<form id="form2" name="form2" method="post" action="[URL]http://www.grafax.co.uk[/URL]">
<input type="submit" name="Submit2" value=".:Grafax:." style="width: 80px" />
</form>
The link dosnt work, it comes up with an "internal server error" but is ok wen i try typing in the url, and i also need it to come in a new window but i cannot use javascript! just CSS and HTML!!
Thanks every1!!
Max
hi all,
I have a special type of gallery on my website (http://www.grafax.co.uk/newtest/gallery) which uses a javascript file to make a div tag hover over the gallery with the image inside of it. however, the page shows before the javascript file is loaded, and so displays the image in the wrong way. Is there a command which makes the user's computer preload the javascript file before allowing the user to click on the hyperlinks or showing the page? i thought somthing like <body onload...> might work. Hopfully somthing simple will work, and the script should not slow down the loading of a page much as it is very small.
Thanks,
Max:mrgreen:
Yay it works!
2 more things.. how do you make it so when you select a new style sheet for the pages it goes there automatically when you press it, rather than having to press the submit button?
Also, how can i make it so the selected option is the style sheet being used? for example, if style sheet 2 was being used, option 2 in the menu would be selected?
Thanks,
Max
yay it works!! the only thing is the cookie isnt working. i have added a second page to the folder and the 2 pages link to eachother so as to test the asp cookie however its not working. Also, how do you make the default style sheet be styles_1.css? Thanks,
Max
current code:
<%@ LANGUAGE="JAVASCRIPT" %>
<% var style = new String(Request.Cookies('style'));
if(style==null || style==''){
style = new String(Request.Form('style'));
if(style==null || style==''){
style="default";
}else{
Response.Cookies('style') = style;
}
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]">
<head>
<link rel="stylesheet" type="text/css" href="style_<%Response.write(style)%>.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>
<select name="style" id="style">
<option value="1" selected="selected">1</option>
<option value="2">2</option>
</select>
</p>
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
<p> </p>
<h1>test heading1 set only in styles.css (origional style) </h1>
</body>
</html>
2 style sheets and page:
page: http://grafax.co.uk/switch/
style1: http://grafax.co.uk/switch/style_1.css
style2: http://grafax.co.uk/switch/style_2.css
somthing is still going wrong but im not sure. i understand a little of the asp code but not much.
Thanks for all your help by the way!
Still not working :/ i have one stylesheet called styles.css which should be the default style sheet, i have another called styles2.css which is an alternate one. Is the code ok for that? Max
(new code..)
<%@ LANGUAGE="JAVASCRIPT" %>
<% var style = new String(Request.Cookies('style'));
if(style==null || style=='undefined'){
style = new String(Request.Forms('style'));
if(style==null || style=='undefined'){
style="default";
}else{
Response.Cookies('style') = style;
}
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]">
<head>
<link rel="stylesheet" type="text/css" href="/styles/style_<%Response.write(style)%>.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>
<select name="style" id="style">
<option value="styles.css" selected="selected">1</option>
<option value="styles2.css">2</option>
</select>
</p>
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
<p> </p>
<h1>test heading1 set only in style.css (origional style) </h1>
</body>
</html>
do i need anything in the form action section? at the moment i have a submit button and thats all..
Hi, I have just tested it and there is one error. im not entirely sure what it is so go here to see the script in action.
Below is the script for the page.
<%@ LANGUAGE="JAVASCRIPT"
var style = new String(Request.Cookies('style'));
if(style==null || style=='undefined'){
style = new String(Request.Forms('style'));
if(style==null || style=='undefined'){
style="default";
}else{
Response.Cookies('style') = style;
}
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]">
<head>
<link rel="stylesheet" type="text/css" href="/styles/style_<%Response.write(style)%>.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<select name="style" id="style">
<option value="styles.css" selected="selected">1</option>
<option value="styles2.css">2</option>
</select>
</form>
</body>
</html>
wow brilliant thanks! most people just put waffly replies with no real direction or instructions for newbies but urs was perfect! :D and thanks for the fast response! :cheesy: ill test it tomrrow its kidna late now so if any problems come up ill give u a buzz :D thanks a lot,
Max Mumford.
Hi all, how, using asp, can i make a form menu change the style sheet loaded, when it is clicked on, then refresh and page, and create a cookie which tells the browser which style sheet to load for that user when they next enter the website?
Thanks,
Max.
bleuh inserting .swf files is such a tricky thing to make browser safe. I find that using the folllowing code that i think dreamweaver gave me is the best iv found! although i have not had much experiance with this at all, i have had some. Below is the code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[URL]http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0[/URL]" width="550" height="400" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="videos/hdsd mov.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="LOOP" value="false"><embed src="videos/hdsd mov.swf" width="550" height="400" loop="false" align="middle" quality="high" bgcolor="#ffffff" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="[URL]http://www.macromedia.com/go/getflashplayer[/URL]" />
</object>
What this does is uses one script for embedding the swf for one type of browser, and in the <noscript> section which would be activated is another script, for the alternative browsers. Just edit in your own preferences, and it should work. Hope this hepls!!
Max.
Image ready is pretty much photoshop, just with a few extra gajets. One of these is the animation pallete, which gives you the option to make the frames for the anim using the different layers in your picture. I personally would'nt spend too much upgrading to have image ready, when you could maybe get a flash or even image ready trial and use that for a few days. Using image ready would still mean creating the movement layer by layer though...
Hi all,
I have some script which doesnt work at all in firefox or other browsers, and i was wondering how to make a browser checker script which checked if the user was using IE, and if they are, show the script. If not, write somthing else for example "Go to the gallery page to see our pictures". Im not very good with javascript but am good with html and css. below is a copy of the script which does not work in FF. Thanks!!!
<script language="JavaScript">
<!--
function random_content(){ //function name
var mycontent=new Array() //mycontent=arrey1
mycontent[0]='<a class="randomthumb" target="_blank" href="images/pics/previews/black forna PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/black[/URL] forna thumb.jpg" /></a>'
mycontent[1]='<a class="randomthumb" target="_blank" href="images/pics/previews/black lillies PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/http://grafax.co.uk/newtest/images/pics/thumbnails/black%20lillies%20thumb.jpg[/URL]" />'
mycontent[2]='<a class="randomthumb" target="_blank" href="images/pics/previews/blue shell PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/blue[/URL] shell thumb.jpg" />'
mycontent[3]='<a class="randomthumb" target="_blank" href="images/pics/previews/blue zoom PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/Blue[/URL] Zoom thumb.jpg" />'
mycontent[4]='<a class="randomthumb" target="_blank" href="images/pics/previews/brown abstract PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/brown[/URL] abstract thumb.jpg" />'
mycontent[5]='<a class="randomthumb" target="_blank" href="images/pics/previews/chrome forna PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/chrome[/URL] forna thumb.jpg" />'
mycontent[6]='<a class="randomthumb" target="_blank" href="images/pics/previews/dark dreams PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/dark[/URL] dreams thumb.jpg" />'
mycontent[7]='<a class="randomthumb" target="_blank" href="images/pics/previews/deco drop PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/deco[/URL] drop thumb.jpg" />'
mycontent[8]='<a class="randomthumb" target="_blank" href="images/pics/previews/deco smudge PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/deco[/URL] smudge thumb.jpg" />'
mycontent[9]='<a class="randomthumb" target="_blank" href="images/pics/previews/directional PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/directional[/URL] thumb.jpg" />'
mycontent[10]='<a class="randomthumb" target="_blank" href="images/pics/previews/downward shine PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/downward[/URL] shine thumb.jpg" />'
mycontent[11]='<a class="randomthumb" target="_blank" href="images/pics/previews/falling flower PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/falling[/URL] flower thumb.jpg" />'
mycontent[12]='<a class="randomthumb" target="_blank" href="images/pics/previews/glow frame PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/glow[/URL] frame …
yeh sorry i just realised i posted in the wrong forum :S
Hi all,
I have some script which doesnt work at all in firefox or other browsers, and i was wondering how to make a browser checker script which checked if the user was using IE, and if they are, show the script. If not, write somthing else for example "Go to the gallery page to see our pictures". Im not very good with javascript but am good with html and css. below is a copy of the script which does not work in FF. Thanks!!!
<script language="JavaScript">
<!--
function random_content(){ //function name
var mycontent=new Array() //mycontent=arrey1
mycontent[0]='<a class="randomthumb" target="_blank" href="images/pics/previews/black forna PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/black[/URL] forna thumb.jpg" /></a>'
mycontent[1]='<a class="randomthumb" target="_blank" href="images/pics/previews/black lillies PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/http://grafax.co.uk/newtest/images/pics/thumbnails/black%20lillies%20thumb.jpg[/URL]" />'
mycontent[2]='<a class="randomthumb" target="_blank" href="images/pics/previews/blue shell PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/blue[/URL] shell thumb.jpg" />'
mycontent[3]='<a class="randomthumb" target="_blank" href="images/pics/previews/blue zoom PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/Blue[/URL] Zoom thumb.jpg" />'
mycontent[4]='<a class="randomthumb" target="_blank" href="images/pics/previews/brown abstract PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/brown[/URL] abstract thumb.jpg" />'
mycontent[5]='<a class="randomthumb" target="_blank" href="images/pics/previews/chrome forna PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/chrome[/URL] forna thumb.jpg" />'
mycontent[6]='<a class="randomthumb" target="_blank" href="images/pics/previews/dark dreams PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/dark[/URL] dreams thumb.jpg" />'
mycontent[7]='<a class="randomthumb" target="_blank" href="images/pics/previews/deco drop PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/deco[/URL] drop thumb.jpg" />'
mycontent[8]='<a class="randomthumb" target="_blank" href="images/pics/previews/deco smudge PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/deco[/URL] smudge thumb.jpg" />'
mycontent[9]='<a class="randomthumb" target="_blank" href="images/pics/previews/directional PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/directional[/URL] thumb.jpg" />'
mycontent[10]='<a class="randomthumb" target="_blank" href="images/pics/previews/downward shine PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/downward[/URL] shine thumb.jpg" />'
mycontent[11]='<a class="randomthumb" target="_blank" href="images/pics/previews/falling flower PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/falling[/URL] flower thumb.jpg" />'
mycontent[12]='<a class="randomthumb" target="_blank" href="images/pics/previews/glow frame PREVIEW.jpg"><img src="[URL]http://grafax.co.uk/newtest/images/pics/thumbnails/glow[/URL] frame thumb.jpg" />' …
lol ok to be honest ill just manually make the link's targets _blank :P Thanks a lot though.. learned a lot :D
ok cool thanks :) so if i just put
a.externallink {
target-name: new;
target-new: window;
}
will that style it for a:link a:hover a:visited and a:active? also, can i put a:externallink:link etc after it and the open in new window script and styles will work with it?
Max.
ok thanks. ill put the code in anyway. do you know it?
Hi all,
How do I make a link with the class of "externallink" open in a new window using css? Here is my current style for "externallink" class:
a.externallink:link {
color: #FF99FF;
text-decoration: none;
}
Thanks!!
Max. :cheesy:
the password in the script is encrypted. Thanks anyway. Max
tnx for all the help. works perfectly
Hi all, im trying to make a script which sends the link of the page to a specified email address. I have made it work by using a script from an external file, but when i call up the server variable request url, ht gets the wrong one, so i put the script in the same page as the page that needs to be called up in the email. The script is kinda complicated (for me - i am self tought) and could sombody tell me what im doing wrong? here it is:
<%
Response.Buffer = True
'Dimension variables
Dim strBody 'Holds the body of the e-mail
Dim objJMail 'Holds the mail server object
Dim strMyEmailAddress 'Holds your e-mail address
Dim strSMTPServerAddress 'Holds the SMTP Server address
Dim strCCEmailAddress 'Holds any carbon copy e-mail addresses if you want to send carbon copies of the e-mail
Dim strBCCEmailAddress 'Holds any blind copy e-mail addresses if you wish to send blind copies of the e-mail
Dim strReturnEmailAddress 'Holds the return e-mail address of the user
'----------------- Place your e-mail address in the following sting ---------------------------------
strMyEmailAddress = request.form("femail")
'---------- Place the address of the SMTP server you are using in the following sting ---------------
strSMTPServerAddress = "smtp.ntlworld.com"
'-------------------- Place Carbon Copy e-mail address in the following sting ------------------------
strCCEmailAddress = request.form("yemail") 'Use this string only if you want to send the carbon copies of the e-mail
'-------------------- Place Blind Copy e-mail address in the following sting -------------------------
strBCCEmailAddress = "" 'Use this …
Hi all,
i need a password script for one page which takes you to the next page. I dont have access to a database so i need it to be stored either in a txt filfe or in the script itself. Thanks!!
Max :mrgreen:
i know, i tried to use both ftpvoyager and smartftp but both saids it couldnt do it, so i contacted support and they said they didnt support it, which suggests other hosts do.
yup im on windows. It dosnt matter so much anymore, i might change website provider because they dont support some php scripts or chmod permissions externally and they are not veyr satisfactory to be honest. Im with fasthosts. What host would you recommend? bearing in mind, i need somthing for around £5 per month, preferably high bandwidth because i show graphic art on my website, and large pictures are downloaded to be viewed frequently. thanks,
Max
yeh i was adding the code with my brother and he spotted it so i changed it. sorry for not mentioning! i didnt think it would help :s anyway, thanks again for the help.
Perfect, thanks! The code works perfectly and ty for the detailed explanation - i dont understand embeds or css but i do better now :mrgreen:
i would but nobody is answering anything lol. thanks anyway
Hi all,
I need to have a semi transparent picture hovering over a windows media player plugin video. How do i do this? Html preferably...
Thanks,
Max
What DOCTYPE do i need to use this script?
go on this link to find it:
http://www.dynamicdrive.com/style/csslibrary/item/suckertree-menu-horizontal/P30/
Thanks!
Max
ah ok. How do i complete the DOCTYPE?
and ps:
thanks for the help with the border. i didnt think of looking at the content!
Ok, its just a maximise window script because all the tables get messed up when the window is not maximised.
grrr i dont like firefox. do you have any ideas on how i can change the code so it works with firefox?
Ok, dwt is a dreamweaver template file. I have replaced it with a regular .htm file so go here so see the page:
http://www.themepics.co.uk/grafex/test
i have checked the css over and over again, as far as i can see there is no script telling the browser to put a line or border there. Take a look at the code.
Thanks,
Max
Hi all,
I have a menu on my website and i got the code from a website called dynamicdrive.com, and the menu is based on css and a bit of javascript, with the menu content consisting of list values. The initial border for the menu is black, so that little line on the left of the list does not show, but i changed the border to #ccc. I was wondering if there is a css code to get rid of this line? Click on this link to get a pic which shows u the line that i mean:
http://www.themepics.co.uk/images/grafex/list.jpg
and here is the page (just to make sure it is the list line, not just some code:
http://www.themepics.co.uk/grafex/test/index%20template.dwt
(the site is not nearly finished so theres loadsa errors which are not there on the real copy (ontside of my main site))
Summary:
how do i delete the line on the left of a list?
Thanks,
Max
FINALLY! lol iv just fixed it using that layout design. I just had to paste the main table into the cell above, and put the lower content into a new merged cell section underneath. Thanks all! Heres how it looks atm without the pics:
http://www.ThemePics.co.uk/grafex
thanks again!! Max
Ok thanks. after posting i did pretty much that layout, and made a new editable region in the lower content, and for some reason it didnt even show up. there was text in the region, but it didnt show up in IE7 preview. This is a link to how it is now: (i made a new table, trying to have the same table cell sizes as the main table underneath so it looked like they were attatched which fixed the problem, but is very awkward to use and unelegant, especially when the window is not maximised)
http://www.themepics.co.uk/grafex/second%20table/with%20second%20table.htm
Hope this is understandable! its kind of complicated :/
thanks!
Max
Hi all,
I have set up my website with tables, with columns on the left, then a center with the main content in, then another table will the content on the right. Whenever i have a lot of text in the center, the columns on the left go bigger, therefor making them look strange because of the background pics. Here is a link to how it looks:
http://www.themepics.co.uk/grafex/broken.htm
(dont worry about a few broken links to pics - this is not were i am storing the site)
how can i stop that from happening?
thanks,
Max
ps this is how it should look: http://www.themepics.co.uk/grafex/not-broken.htm
ok thanks
lol thanks :P
lol one more question, how do i make an embedded css have two sections, one for an editable template region called header, and another for everything else?
lol ok :P
ahhh ok i get it. The only thing is that that method wouldnt actually be much faster would it? or would it just make it easier and faster for the browser to read and download the page