|
-
How do I get my webpage to look the same on all resolutions?
Date: 12/10/05
(HTML Help) Keywords: css, html, web
Newbie here. *waves*
So, I've reached absolute last nerve with this. I don't know much about HTML/CSS but I tried to start up a website (HERE. Please ignore my comments. XD) not too long ago. I have a 800x600 resolution and am tryin' to use div layers. I'm tryna make my my website "expand" (like the header an' stuff) for people with larger resolutions. I read somewhere that you set that height an' width to 100%, so that it takes up that amount regardless of the resoulution..but I think that's if you use tables instead of div layers. T__T Does anyone know the correct way to do this? Cause I know there's a way..I jus' can't find it. ;_____;
|
< td align="left" valign="middle" width="254">< input type="submit" name="submitEmail" value="Send Email">< /td>
< /tr>
< tr>
< td align="right" valign="middle" width="143">
< td align="left" valign="middle" width="254">
< /tr>
< /table>
< /form>
The PHP script
if (!empty($HTTP_POST_VARS))
{
//Check for spammers first
if (eregi("MIME-Version: ",$_POST['youremail'].$_POST['yourname'].
$_POST['yourorganization'].$_POST['comment'])){die('Get out, spammer.');}
$now = date( "D dS M h:m:s" ); // Set these variables according to your details
$toAddress = "***@****.***" ;
$redirect = "contactconfirm.php";
$subject = "Contact Message from BII Website" ;
// Form information.
$formEmail = trim($HTTP_POST_VARS[ 'youremail' ]);
$emailparts=explode("@",$formEmail);
if ($emailparts[1]=="*****.***"){ //Another spammer stop.
die('You seem to be trying to use this form to spam. Stop it.');
}
$formName = trim($HTTP_POST_VARS[ 'yourname' ]);
$formOrg = trim($HTTP_POST_VARS[ 'yourorganization' ]);
$formMessage = trim($HTTP_POST_VARS[ 'comment' ]); // Email message
$message = "Name: " .$formName. "\n" ;
$message .= "Email: " .$formEmail. "\n" ;
$message .="IP Address: ".$REMOTE_ADDR. "\n";
$message .= "Organization:" .$formOrg. "\n" ;
$message .= "Comments:\n" ;
$message .= $formMessage. "\n" ;
$headers="From: \"".$formName."\" <".$formEmail.">\n";
$bMailSent = mail($toAddress, $subject, $message, $headers);
if (!$bMailSent){ echo "Unable to send email"; }
else { header("Location: $redirect"); }
}
?>
Source: http://www.livejournal.com/community/php/380005.html
JavaScript Image Rotation Issues
Date: 12/16/05
(WebDesign) Keywords: web, seo
I've been using a bit of script that loads a random image, URL and text into a page each time the page is loaded.
This seems to work fine for up to 15 images/arrays, but over that, it starts to complain that:
"Error: 'image.href' is null or not an object"
Here's the code:
function create() {
this.width = ''
this.height = ''
this.src = ''
this.href = ''
this.border = ''
this.mouseover = ''
this.sponsor = ''
}
scs = new Array()
for(var i=1; i<=19; i++) { scs[i] = new create() }
scs[1].width = "437"
scs[1].height = "292"
scs[1].src = "images/splash/Ritz.jpg"
scs[1].href = "http://www.theritzlondon.com/"
scs[1].border = "0"
scs[1].mouseover = "Click here to visit The Ritz"
scs[1].sponsor = "The Ritz"
scs[2].width = "400"
scs[2].height = "316"
scs[2].src = "images/splash/nhac.jpg"
scs[2].href = "http://www.nh-hotels.com/portal/page?_pageid=9,424&_dad=porweb&_schema=PORTAL30"
scs[2].border = "0"
scs[2].mouseover = "Click here to visit NH Hoteles"
scs[2].sponsor = "NH Hoteles - The Amsterdam Centre Hotel"
scs[3].width = "400"
scs[3].height = "266"
scs[3].src = "images/splash/nhcc.jpg"
scs[3].href = "http://www.nh-hotels.com/portal/page?_pageid=9,424&_dad=porweb&_schema=PORTAL30"
scs[3].border = "0"
scs[3].mouseover = "Click here to visit NH Hoteles"
scs[3].sponsor = "NH Hoteles - The City Centre Hotel"
scs[4].width = "400"
scs[4].height = "316"
scs[4].src = "images/splash/nhdh.jpg"
scs[4].href = "http://www.nh-hotels.com/portal/page?_pageid=9,424&_dad=porweb&_schema=PORTAL30"
scs[4].border = "0"
scs[4].mouseover = "Click here to visit NH Hoteles"
scs[4].sponsor = "NH Hoteles - The Doelen Hotel"
scs[5].width = "318"
scs[5].height = "400"
scs[5].src = "images/splash/nhghk.jpg"
scs[5].href = "http://www.nh-hotels.com/portal/page?_pageid=9,424&_dad=porweb&_schema=PORTAL30"
scs[5].border = "0"
scs[5].mouseover = "Click here to visit NH Hoteles"
scs[5].sponsor = "NH Hoteles - The Grand Hotel Krasnapolsky"
scs[6].width = "400"
scs[6].height = "319"
scs[6].src = "images/splash/nhsh.jpg"
scs[6].href = "http://www.nh-hotels.com/portal/page?_pageid=9,424&_dad=porweb&_schema=PORTAL30"
scs[6].border = "0"
scs[6].mouseover = "Click here to visit NH Hoteles"
scs[6].sponsor = "NH Hoteles - The Schiller Hotel"
scs[7].width = "400"
scs[7].height = "320"
scs[7].src = "images/splash/hch.jpg"
scs[7].href = "http://www.hastingshotels.com"
scs[7].border = "0"
scs[7].mouseover = "Click here to visit Hastings Hotels"
scs[7].sponsor = "The Hastings Culloden Hotel"
scs[8].width = "400"
scs[8].height = "369"
scs[8].src = "images/splash/hmb.jpg"
scs[8].href = "http://www.hotelmajestic.es"
scs[8].border = "0"
scs[8].mouseover = "Click here to visit the Hotel Majestic Barcelona"
scs[8].sponsor = "The Hotel Majestic Barcelona"
scs[9].width = "400"
scs[9].height = "422"
scs[9].src = "images/splash/hi.jpg"
scs[9].href = "http://www.hotel-inglaterra.com"
scs[9].border = "0"
scs[9].mouseover = "Click here to visit the Hotel Inglaterra"
scs[9].sponsor = "The Hotel Inglaterra"
scs[10].width = "400"
scs[10].height = "275"
scs[10].src = "images/splash/hlb.jpg"
scs[10].href = "http://www.lebristolparis.com"
scs[10].border = "0"
scs[10].mouseover = "Click here to visit the Hotel Le Bristol"
scs[10].sponsor = "The Hotel Le Bristol, Paris"
scs[11].width = "400"
scs[11].height = "403"
scs[11].src = "images/splash/hmraa.jpg"
scs[11].href = "http://www.solmelia.com"
scs[11].border = "0"
scs[11].mouseover = "Click here to visit the Hotel Melia Roma Aurelia Antica"
scs[11].sponsor = "The Hotel Melia Roma Aurelia Antica"
scs[12].width = "300"
scs[12].height = "414"
scs[12].src = "images/splash/h71.jpg"
scs[12].href = "http://www.hotel71.com"
scs[12].border = "0"
scs[12].mouseover = "Click here to visit Hotel 71"
scs[12].sponsor = "Hotel 71, Chicago"
scs[13].width = "267"
scs[13].height = "339"
scs[13].src = "images/splash/ebhih.jpg"
scs[13].href = "http://www.hiexpresshammersmith.co.uk/"
scs[13].border = "0"
scs[13].mouseover = "Click here to visit Somerston Hotels - Express by Holiday Inn Hammersmith"
scs[13].sponsor = "Somerston Hotels - Express by Holiday Inn Hammersmith"
scs[14].width = "435"
scs[14].height = "336"
scs[14].src = "images/splash/rg.jpg"
scs[14].href = "http://www.royalgardenhotel.co.uk/"
scs[14].border = "0"
scs[14].mouseover = "Click here to visit the Royal Garden Hotel"
scs[14].sponsor = "The Royal Garden Hotel"
scs[15].width = "440"
scs[15].height = "320"
scs[15].src = "images/splash/cml.jpg"
scs[15].href = "http://www.lucienbarriere.com/localized/en/portail/hotels/nos_etablissements/castel_marie_louise/index.asp?choix_1=la_baule&choix_2=castel_marie_louise"
scs[15].border = "0"
scs[15].mouseover = "Click here to visit the Lucien Barriere, Castel Marie-Louise"
scs[15].sponsor = "Lucien Barriere, Castel Marie-Louise"
scs[16].width = "435"
scs[16].height = "336"
scs[16].src = "images/splash/hb.jpg"
scs[16].href = "http://www.lucienbarriere.com/localized/en/portail/hotels/nos_etablissements/hermitage/index.asp?choix_1=la_baule&choix_2=hermitage"
scs[16].border = "0"
scs[16].mouseover = "Click here to visit the Lucien Barriere, Hermitage Barriere"
scs[16].sponsor = "Lucien Barriere, Hermitage Barriere"
scs[17].width = "435"
scs[17].height = "336"
scs[17].src = "images/splash/hb.jpg"
scs[17].href = "http://www.lucienbarriere.com/localized/en/portail/hotels/nos_etablissements/hermitage/index.asp?choix_1=la_baule&choix_2=hermitage"
scs[17].border = "0"
scs[17].mouseover = "Click here to visit the Lucien Barriere, Hermitage Barriere"
scs[17].sponsor = "Lucien Barriere, Hermitage Barriere"
scs[18].width = "435"
scs[18].height = "336"
scs[18].src = "images/splash/hb.jpg"
scs[18].href = "http://www.lucienbarriere.com/localized/en/portail/hotels/nos_etablissements/hermitage/index.asp?choix_1=la_baule&choix_2=hermitage"
scs[18].border = "0"
scs[18].mouseover = "Click here to visit the Lucien Barriere, Hermitage Barriere"
scs[18].sponsor = "Lucien Barriere, Hermitage Barriere"
scs[19].width = "435"
scs[19].height = "336"
scs[19].src = "images/splash/hb.jpg"
scs[19].href = "http://www.lucienbarriere.com/localized/en/portail/hotels/nos_etablissements/hermitage/index.asp?choix_1=la_baule&choix_2=hermitage"
scs[19].border = "0"
scs[19].mouseover = "Click here to visit the Lucien Barriere, Hermitage Barriere"
scs[19].sponsor = "Lucien Barriere, Hermitage Barriere"
var n = Math.random() + ''
n = parseInt(n.charAt(19))
if(n >19) {
n = n - 19
}
else if(n==0) {
n = n + 19
}
n += ""
var image = scs[n]
var sc = ""
sc += ' \n'
sc += '
' + image.sponsor + ''
The script is loaded from the head as an external .js file and called in the body as this:
Any ideas why it starts failing after 15 arrays? I've tried 'easier' URLs and different images to no avail.
I've also tried a different script within the body since, but this one rotates the images all the time and too quickly. Any ideas on how to slow it down so that the images are changed say every 20 seconds (20000 milliseconds)? I've tried some setTimeouts in various places but can't seem to slow it down. Code:
Source: http://www.livejournal.com/community/webdesign/1031171.html
Need some critiquing..
Date: 12/17/05
(WebDesign) Keywords: php, css, web
Hello everyone. I need some critiquing of a website I'm re-doing at work. It's for the company I work at. I'm still learning CSS so I know it's not spectacular. I'm really just wanting to know if you all think the design works or not. What looks good.. what could be better? That sort of thing. I'd really appreciate any feedback you guys can give!
Link:
http://www.aacapartsandsupplies.com/index4.php
Disregard the actual links. They're linked back to the old website for now.
Thanks!!!
Source: http://www.livejournal.com/community/webdesign/1031827.html
Cross-Site Scripting Vulnerability in Apache mod_imap Module
Date: 12/16/05
(Java Web) Keywords: html, web, apache
A cross-site scripting (XSS) vulnerability has been discovered in the Apache httpd server's mod_imap module which allows remote attackers to inject arbitrary web script or HTML via the Referer when using image maps.
Input passed to the image map "Referer" directive in "mod_imap" isn't properly sanitised before being returned to the user. This can be exploited [...]
Source: http://blog.taragana.com/index.php/archive/cross-site-scripting-vulnerability-in-apache-mod_imap-module/
GMail Goes Mobile; Other Goodies
Date: 12/16/05
(Java Web) Keywords: web, microsoft
GMail is now accessible from your WAP enabled mobile by accessing http://m.gmail.com
Your Gmail account stays synched, whether you access it from the web or the mobile interface.
It opens the attachments you receive in messages, including photos, Microsoft Word documents and .pdf files
GMail now added Auto-Responder for vacation responses. It also enabled emailing to groups.
Previously it [...]
Source: http://blog.taragana.com/index.php/archive/gmail-goes-mobile-other-goodies/