Reply
JavaScript Help
Old 05-14-2008, 07:48 AM JavaScript Help
millwalll's Avatar
Webmaster Talker

Posts: 576
Name: James
Location: KENT
Hi all,

After some advice I am doing Web design at collage and need to add some javascript to my page. It has to be something that makes the site better. at this moment I dont have any idears what I can add so was looking for maybe some surgestions.

The site is about ebooks and can be found here
www.ebookcabi.net

Many Thanks


James
__________________
Www.ebookcabi.net
millwalll is offline
Reply With Quote
View Public Profile Visit millwalll's homepage!
 
When You Register, These Ads Go Away!
Old 05-16-2008, 04:38 AM Re: JavaScript Help
chrishirst's Avatar
Super Moderator

Posts: 15,217
Location: Blackpool. UK
Adding a javascript something to a page just because you think you have to, is NOT going to make it "better".
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-16-2008, 07:06 AM Re: JavaScript Help
tripy's Avatar
Fetchez la vache!

Posts: 2,162
Name: Thierry
Location: In the void
Well, I think you already have your javascript thingy
Code:
<script language="javascript">
<!--

/*
Auto center window 
*/
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->
</script>
Yup, that's it! I'm sure the site is now much better than before.

Seriously, Javascript is about programmation.
First, you need to know what you want, and then you can transcript it into a sequence of simple (or less simples) instructions.

It don't do magic tricks. You have to show it what to do first.
__________________
Listen to the ducky: "This is awesome!!!"


Last edited by tripy : 05-16-2008 at 07:08 AM.
tripy is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to JavaScript Help
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12452 seconds with 12 queries