Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 3rd, 2004, 07:20 AM
Authorized User
 
Join Date: Oct 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Comments in my javascripts 6

With the help of some good people from this community I've (or they) made 6 javascripts for me.
I'm in an emergency situation now I have to comment those codes.
I could have done it by myself but.....I can't.....
So if someone can help me please fell free!!!!
And here comes the 6th one!


<html>
<head>
<link href="css.css" rel="stylesheet">
<title>Change Appearance</title>

<style type="text/css">

#textruta {position:absolute; left:500px; top: 200px; width:80px; height:100px;}

#lank{position:absolute; left:255px; top: 10px;}

#lank1{position:absolute; left:255px; top: 100px;}

#lank2{position:absolute; left:255px; top: 120px;}

#lank3{position:absolute; left:255px; top: 140px;}

#tryck{position:absolute; left:500px; top: 65px;}

#form {position:absolute; left:410px; top: 10px;}

#rubrik{position:absolute; left:500px; top: 10px;}

#divBody{position:absolute; left:20px;top:50px;}

.bild1{
        position: absolute;
    top:70px;
    left:850px;

     }

.bild2{
        position: absolute;
    top:180px;
    left:850px;

     }

.bild3{
        position: absolute;
    top:290px;
    left:850px;

     }


.bild4{
        position: absolute;
    top:70px;
    left:680px;

     }

.bild5{
        position: absolute;
    top:180px;
    left:680px;

     }

.bild6{
        position: absolute;
    top:290px;
    left:680px;

     }

.bild7{
        position: absolute;
    top:500px;
    left:820px;

     }


.box2{
    position:absolute;
    top:70px;
    left:400px;
    width:100px;
    height:100px;
    background-color:silver;
    padding-right: 15px;
       padding-left: 10px;

    }

.p{

    position:absolute;
    top:300px;
    left:760px;
    color:gray;
    text-size:12px;
    font-weight:bold;

    }

.stil{position:absolute; top:80px; left:10px;}

</style>

<script type="text/javascript">

function andra_farg(namn,farg) //Ändrar textens färg
{
if (document.all) //Explorer 4,5
{
document.all[namn].style.color=farg;
}
else if (document.getElementById) //Netscape 6
{
document.getElementById(namn).style.color=farg;

}

}



function changeFontFamily(FontFamily)
{
  var oElement = document.getElementById("divBody");
  changeStyleAttribute(oElement, "fontFamily", FontFamily);
}

function changeFontSize(FontSize)
{
  var oElement = document.getElementById("divBody");
  changeStyleAttribute(oElement, "fontSize", FontSize);
}

function changeStyleAttribute(Element, Attribute, Value)
{
  Element.style[Attribute] = Value;
}

</script>

</head>

<body>
<div class="back"><a href="links.html">Tillbaka</a></div>
<fselect onChange="document.bgColor=this.options[this.selectedIndex].value">

    <!--------------------------------------------------------*
    //Användaren kommer själv att ändra pÃ¥ bakgrundsfärg *
    // genom att välja ett alternativ *
    // frÃ¥n checkboxen *
    ---------------------------------------------------------->
<form><div id="form">

<select onChange="document.bgColor=this.options[this.selectedIndex].value">

    <!--------------------------------------------------------*
    // Användaren kan ändra pÃ¥ bakgrundsfärg *
    ---------------------------------------------------------->

<OPTION VALUE="#FFFFFF" SELECTED>Vit
<OPTION VALUE="#000000">Svart
<OPTION VALUE="#FFFF00">Gul
<OPTION VALUE="#FF0000">Röd
<OPTION VALUE="#0000FF">Blå
<OPTION VALUE="#33CC00">Grön
<OPTION VALUE="#00CCFF">Ljusblå
<OPTION VALUE="#FF9900">Orange
<OPTION VALUE="#0C1D64">Mörkblå
</select>
</div>
</form>

<div id="tryck">Tryck på <br/>länkarna nedan.<br/></div>

<DIV ID="textruta" STYLE="position:relative" onClick="andra_farg('textruta','red')">
<h3>Nu kan <b>DU</b> påverka denna sidans utsendet!</h3>
<p>Detta kan du göra genom att välja olika stilar, färger och bakgrundsfärg!</p>
<h4>Nu är det bara att prova och se resultatet!</h4>
</DIV>


<BR>
<div id="lank">

<div id="lank1"><A HREF="javascript:andra_farg('textruta','#FF00CC')" >Lila</A></div>

<div id="lank2"><A HREF="javascript:andra_farg('textruta','#FF6600')" >Orange</A></div>

<div id="lank3"><A HREF="javascript:andra_farg('textruta','#00CC00')" >Grön</A></div>
</div>

<div id="divBody" style="font-family: Times New Roman; font-size:12pt;">
Texten kan förändras genom att välja olika alternativ. <br/>

<div class="stil">
<select onchange="changeFontFamily(this.options[this.selectedIndex].value);">
<option value="Times New Roman" selected>Times New Roman</option>
<option value="Tahoma">Tahoma</option>
<option value="Book Antiqua">Book Antiqua</option>
<option value="Arial">Arial</option>
<option value="Webdings">Webdings</option>
</select>

<select onchange="changeFontSize(this.options[this.selectedIndex].value);">
<option value="6pt">6 point</option>
<option value="8pt">8 point</option>
<option value="9pt">9 point</option>
<option value="10pt">10 point</option>
<option value="12pt">12 point</option>
</select>


<div class="p">NACKADEMIN</div>


<h2> WEBBDESIGN </h2>
<h3>Kreativitet och teknik<br/></h3>
Utbildningen webbdesign riktar sig till<br/>
dig som vill arbeta med både teknik<br/>
och den kreativa processen. <br/>
Vi utbildar dig på de tekniker du behöver<br/>
för att arbeta med dagens webbapplikationer <br/>
samtidigt som du får en grundlig<br/>
Utbildning i estetisk webbkommunikation med <br/>
ämnen som exempelvis grafisk produktion,<br/>
grafisk form och användargränssnitt.

<h3>Utbildningsmetod</h3>

Nackademins utbildningsmetod bygger<br/>
på den så kallade COOP-modellen. <br/>
Här varvas de teoretiska studierna <br/>
med LIA under hela utbildningen.<br/>
Beroende på vilken utbildning du<br/>
väljer ingår 1 till 3 LIA-perioder<br/>
om cirka 10 veckor vardera.<br/>

Modellen är utformad i samarbete<br/>
med näringslivet och har många <br/>
fördelar både för dig som student <br/>
och för företagen. För dig innebär <br/>
det att du tidigt kommer ut på arbets-<br/>
platsen och får praktiska erfarenheter <br/>
av det yrke du studerar till. <br/>
En fullständig utbildning på Nackademin <br/>
tar två år, utom säljutbildningen <br/>
som är ettårig.
</div>
</div>
</div>

<div class="bild4"><img src="design.jpg" alt="" width="150" height="100"/></div>
<div class="bild5"><img src="ekonomi.jpg" alt="" width="150" height="100"/></div>
<div class="bild6"><img src="bygg.jpg" alt="" width="150" height="100"/></div>

<div class="bild1"><img src="skol.jpg" alt="" width="150" height="100"/></div>
<div class="bild2"><img src="skarm.jpg" alt="" width="150" height="100"/></div>
<div class="bild3"><img src="lunch.jpg" alt="" width="150" height="100"/></div>

<div class="bild7"><img src="nd.gif" alt="" width="100" height="100"/></div>

</body>
</html>


A big thanxs to all of you who helped me a lot!!!!
Thanxs!!!!!!
 
Old November 3rd, 2004, 02:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I don't think this is a very good idea. First of all, you're posting an awful lot of code in way too many messages, wasting other people's time, bandwidth and CPU cycles.

Secondly, even if we were to comment your pages, why post EVERYTHING and not just ask for an explanation for parts of your code you don't understand. What's there to comment for a simple CSS selector or a paragraph?

And finally, what on earth are you thinking??????? We do your work and you get the credits, money or whatever it is you get for this job? Why would we do that? I think you should do your own work, don't you think?

This forum is for help with problems you don't understand or cannot figure out all by yourself. This forum is NOT a cheap way to get your work done by others.

Cheers and have fun commenting. Maybe Mehdi can do it for you ;)

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Last Call by Big Boi feat. Slimm Calhoun, Lil’ Jon & The East Side Boyz & Mello (Track 18 from the album: Speakerboxxx) What's This?
 
Old November 3rd, 2004, 05:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Read below

Hal Levy
I am here to help you, not do it for you.
 
Old November 4th, 2004, 10:30 AM
Authorized User
 
Join Date: Oct 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well first of all I send the wrong codes...so you don't have to be that rude...
It was ment to be the javascript only ofcourse I can comment the simple HTML codes but I have trouble understanding each and every single part of javascripts.
There are people who don't know a thing ....Think about that......and it was for school by the way...

SO


A big thanxs to all of you who helped me a lot!!!!
Thanxs!!!!!!
 
Old November 4th, 2004, 02:59 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am not sure I understand why you think any of us was rude. I was just trying to explain how things work. Nothing more, nothing less.

I do realize there are people that don't know the things they need to build web sites. In fact, I do realize that so much that I spend about half an hour a day trying to help these people on this forum wherever I can. I don't get paid for that; all that drives me is my wish to help others.

However, asking for help is not the same as asking other people to do your work. Like I said earlier, you could have posted parts of your code, and ask for an explanation about the inner works of the code. That's quite different from posting 6 messages and say "Hey, can you comment this for me??"

Posting 6 messages with loads of code, only later to realize it was the wrong code only makes things worse, IMHO.

Imar
 
Old November 4th, 2004, 04:08 PM
Authorized User
 
Join Date: Oct 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes I know..I should have done so but I didn't...I send wrong parts of the codes but anyway I was in a hurry having other things waiting to be done..
I give up and I won't do these exercises cause I have other subjects as well and don't have time to go through all this....
anyway...
Thanxs






Similar Threads
Thread Thread Starter Forum Replies Last Post
IIS ->Javascripts, any clue? justboomit General .NET 1 July 2nd, 2007 08:32 AM
Comments in my javascripts 4 xristina Javascript 1 November 4th, 2004 10:31 AM
Comments in my javascripts 5 xristina Javascript 1 November 4th, 2004 10:31 AM
Comments in my javascripts xristina Javascript 2 November 4th, 2004 10:30 AM
Comments in my javascripts 2 xristina Javascript 1 November 3rd, 2004 09:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.