dcsimg
www.webdeveloper.com
Page 1 of 4 123 ... LastLast
Results 1 to 15 of 57

Thread: for() loop and decrements

  1. #1
    Join Date
    Oct 2003
    Location
    Pensacola, Fl
    Posts
    241

    for() loop and decrements

    Hey everybody...I've got a snippet of code which is a for loop, and I'm finding that the decrement I make to a variable in the loop is preventing it from repetitively executing as it should. If you'd like to take a look at it and make suggestions for what the problem may be, I'd welcome the response. As for the decrement, it's on the variable PicNum, and I'm tried it several ways to no avail. I've tried PicNum--, and PicNum=PicNum-1. Nothing has worked yet. Take a look at the loop I'll quote, and make some suggestions...

    Code:
    	for(var i=1;i<17;i++)
    	{
    		PicNo="pic"+i;
    		PicCost="pic"+i+"cost";
    		PicSet=document.getElementById(PicNo);
    		CostSet=document.getElementById(PicCost);
    		switch(Key)
    		{
    			case Items[PicNum][3]:
    					PicSet.src=Items[PicNum][2]; CostSet.innerHTML=Items[PicNum][1]; PicWin[i]=Items[PicNum][0]; PicNum-=1;
    					if(document.getElementById("pic16").src>"" && PicNum<Items.length){document.getElementById("Next").style.display="block"; NextPrevKey=Key;}
    					if(PicWin[1]>16){document.getElementById("Previous").style.display="block";}
    					switch(document.getElementById("pic16cost").innerHTML){case "": document.getElementById("Next").style.display="none"; NextPrevKey=Key; break; default: break;}
    					break;
    			default:
    					PicSet.src=""; CostSet.innerHTML=""; PicWin[i]=""; PicNum-=1; i-=1; NextPrevKey=Key;
    					break;
    		}
    }
    Your friendly neighborhood Okham. -o-o-

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,243
    For one, that is completely the wrong use of switch..case and you are alos in the default: element doing this i-=1 which will keep the value of i from properly incrementing.

    You should explain what it is you want to do, switch..case is a direct matching exercise like so...
    Code:
    switch( n ){
        case "One": // when n = "One" then variable one will = 1 
            var one = 1; 
        break; 
    
        case 1: // when n = 1 then variable one will = "One" 
            var one = "One"; 
        break;
    }
    The use of case to evaluate is not the proper use of switch..case, thats what if() conditionals are for. This subject has been covered in the past and while people persist in using this method and encounter issues and problems with it, the lesson that no one takes away is that its not meant to be used like this because the case will evaluate a logic (boolean) value.

    I would like to know where you got the snippit from because it is pretty bad programming.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    Join Date
    Oct 2003
    Location
    Pensacola, Fl
    Posts
    241

    for() loops

    I can see what you're saying about the switch(). I've always wondered what the difference was in using that as opposed to if(). I suppose I'm guilty of bad programming because the snippet I included I wrote...lol. Basically, as far as what I'm trying to accomplish...I have an index page with several categories. I include item files into the document up front, assigning certain values to an array. When a category is clicked on the page, I change the src value of the image objects on the page using the path value that I've stored in the array. I'm going to include the code as far as I've done it on this reply. The code works for clicking some categories, but not for others, and I don't know why. Feel free to take a look at it and give me your opinion.. - - okham

    Code:
    <html>
    	<head>
    		<title>
    			Sundown Coffee
    		</title>
    		<link rel="stylesheet" type="text/css" href="Main.css" media="screen">
    	</head>
    
    <body topmargin=0 leftmargin=0 rightmargin=0 bgcolor="#F7F3DE" onLoad="">
    
    <table width=100% border=0 cellpadding=0 bgcolor="#EBB334" align="center">
    	<tr>
    		<td colspan=3>
    			<a href="Index.html"><img src="Pics/Header.jpg" width=100% /></a>
    		</td>
    	</tr>
    	<tr>
    		<td>
    			<a href="#" onClick="ToggleDiv('GourmetCoffee','BlankDiv');"><img src="Pics/Gourmet Coffee.jpg" width=100% /></a>
    		</td>
    		<td>
    			<a href="#" onClick="ToggleDiv('Teas','BlankDiv');"	><img src="Pics/Tea.jpg" width=100% /></a>
    		</td>
    		<td>
    			<a href="#" onClick="ToggleDiv('Syrups','BlankDiv');"><img src="Pics/Syrups.jpg" width=100% /></a>
    		</td>
    	</tr>
    </table>
    <table border=0 width=100% align="center">
    	<tr>
    		<td height=75 colspan=2>
    			<div id="test"></div>
    			<div id="FileDiv" style="display:block;">
    				<select id="PicPath"></select>
    			</div>
    		</td>
    	</tr>
    	<tr>
    		<td width=25% valign="top">
    			<div id="ListDiv" style="display:block;">
    				<div id="BlankDiv" style="display:none;"></div>
    				<div id="GourmetCoffee" style="display:none;">
    					<a href="List.html"><img src="Pics/Go To List View.jpg" width=100% /></a>
    					<a href="#" onClick="NextPicNum=1; SetPics('Single-Origin Coffee','Next');"><img src="Pics/Single-Origin Coffee.jpg" width=100% /></a>
    					<a href="#" onClick="NextPicNum=1; SetPics('Flavored Coffee','Next');"><img src="Pics/Flavored Coffee.jpg" width=100% /></a>
    					<a href="#" onClick="NextPicNum=1; SetPics('Organic Coffee','Next');"><img src="Pics/Organic Coffee.jpg" width=100% /></a>
    					<a href="#" onClick="NextPicNum=1; SetPics('Coffee Blends','Next');"><img src="Pics/Coffee Blends.jpg" width=100% /></a>
         					<a href="#" onClick="NextPicNum=1; SetPics('Espresso','Next');"><img src="Pics/Espresso.jpg" width=100% /></a>
    
    				</div>
    			</div>
    		</td>
    		<td width=75% valign="top">
    			<table border=0>
    				<tr>
    					<td colspan=4>
    						<a href="#" onClick="SetPics(NextPrevKey,'Previous');"><img src="Pics/Previous.jpg" id="Previous" width=150 style="display:none;" align="left" />
    						</a><a href="#" onClick="SetPics(NextPrevKey,'Next');"><img src="Pics/Next.jpg" id="Next" width=150 style="display:none;" /></a>
    					</td>
    				</tr>
    				<tr>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[1];"><img src="" id="pic1" width=100%></a><br /><div id="pic1cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[2];"><img src="" id="pic2" width=100%></a><br /><div id="pic2cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[3];"><img src="" id="pic3" width=100%></a><br /><div id="pic3cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[4];"><img src="" id="pic4" width=100%></a><br /><div id="pic4cost" class="Itempricefont"></div>
    					</td>
    				</tr>
    				<tr>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[5];"><img src="" id="pic5" width=100%></a><br /><div id="pic5cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[6];"><img src="" id="pic6" width=100%></a><br /><div id="pic6cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[7];"><img src="" id="pic7" width=100%></a><br /><div id="pic7cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[8];"><img src="" id="pic8" width=100%></a><br /><div id="pic8cost" class="Itempricefont"></div>
    					</td>
    				</tr>
    				<tr>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[9];"><img src="" id="pic9" width=100%></a><br /><div id="pic9cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[10];"><img src="" id="pic10" width=100%></a><br /><div id="pic10cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[11];"><img src="" id="pic11" width=100%></a><br /><div id="pic11cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[12];"><img src="" id="pic12" width=100%></a><br /><div id="pic12cost" class="Itempricefont"></div>
    					</td>
    				</tr>
    				<tr>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[13];"><img src="" id="pic13" width=100%></a><br /><div id="pic13cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[14];"><img src="" id="pic14" width=100%></a><br /><div id="pic14cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[15];"><img src="" id="pic15" width=100%></a><br /><div id="pic15cost" class="Itempricefont"></div>
    					</td>
    					<td>
    						<a href="Look.html" onClick="window.name=PicWin[16];"><img src="" id="pic16" width=100%></a><br /><div id="pic16cost" class="Itempricefont"></div>
    					</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    </table>
    
    
    </body>
    
    
    
    
    
    
    <script type="text/javascript">
    
    PicWin=new Array();
    Psub=new Array();
    ShowPics=new Array();
    Items=new Array();
    SetPrev="BlankDiv";
    NextPicNum=1;
    PrevPicNum=Items.length-1;
    NextPrevKey="";
    
    
    
    
    for(var i=1;i<545;i++)
    {
    	PathSrc="CAM Items/"+i+".js";
    	NewInclude=document.createElement("SCRIPT");
    	NewInclude.src=PathSrc;
    	document.head.appendChild(NewInclude);
    	onLoad=SetLoad();
    	document.head.removeChild(NewInclude);
    }
    
    
    
    function SetPics(Key,NextPrev)
    {
    	for(var i=1;i<17;i++)
    	{
    		PicNo="pic"+i;
    		PicCost="pic"+i+"cost";
     		PicSet=document.getElementById(PicNo);
    		CostSet=document.getElementById(PicCost);
       		PicSet.src="";
     		CostSet.innerHTML="";
    		PicWin[i]="";
    		document.getElementById("Next").style.display="none";
    		document.getElementById("Previous").style.display="none";
         	}
    
    	if(NextPrev="Next")
    	{
    for(var i=1;i<17;i++)
    {
    PicNo="pic"+i;
    PicCost="pic"+i+"cost";
    PicSet=document.getElementById(PicNo);
    CostSet=document.getElementById(PicCost);
    if(Items[NextPicNum][3]==Key)
    {
    PicSet.src=Items[NextPicNum][2]; CostSet.innerHTML=Items[NextPicNum][1]; PicWin[i]=Items[NextPicNum][0]; if(NextPicNum>=Items.length-1){}else{NextPicNum++; NextPrevKey=Key; PrevPicNum=PicWin[1]-1;}
    }
    else
    { 
    if(i=1){}else{i=i-1}; if(NextPicNum>=Items.length-1){}else{NextPicNum++; NextPrevKey=Key;}
    }
    if(PicWin[1]>"" && NextPicNum>16){document.getElementById("Previous").style.display="block";}
    if(document.getElementById("pic16cost").innerHTML>"" && NextPicNum<Items.length){document.getElementById("Next").style.display="block";}
    if(PrevPicNum<=0){document.getElementById("Previous").style.display="none";}
    }
    
    	}	
    }
    
    
    
    
    function SetLoad()
    {
    }
    
    
    function ToggleDiv(chk,sub)
    {
    	var SetSub=document.getElementById(sub);
    	var Set=document.getElementById(chk);
    	var LastSet=document.getElementById(SetPrev);
    	switch(Set.style.display)
    	{
    		case "none":
    			LastSet.style.display="none";
    			Set.style.display="block";
    			SetPrev=chk;
    			for(var i=0;i<Psub.length;i++)
    			{
    				document.getElementById(Psub[i]).style.display="none";
    			}
    			Psub.length=0;
    			break;
    	     	case "block":
           		switch(sub)
           		{
           			case "BlankDiv":
           				Set.style.display="none";
           				break;
         				default:
     				      switch(SetSub.style.display)
           				{
    				  	   	case "block":
       							SetSub.style.display="none";
           						break;
           					case "none":
      							SetSub.style.display="block";
           						break;
       						default:
    						      break;
    				      }
    				      break;
    		     	}
    			break;
           	default:
    		      break;
    	}
    }
    
    </script>
    
    
    </html>
    Your friendly neighborhood Okham. -o-o-

  4. #4
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,243
    In a switch..case situation, your use of break; is used after a case block of code comes to an end, you don't use break; after a default: declaration, any code after the default: will be executed until the end of the switch closure brace.

    You also need to add the document type declaration <!DOCTYPE html> at the top before your first tag of <html> as this means that your page will render as expected and not in quirks mode, you use all uppercase for !DOCTYPE because of older browsers do not recognise !doctype and this means should someone access your page with an older browser, the tag itself might not be recognised but the browser should pick up on the fact you have declared a standard.

    You do not need <script type="text/javascript"> anymore, you only need <script> as the type="text/javascript" was dropped from the tag a while back.

    Your script may appear anywhere in your page but generally its accepted that it goes in the head of the document, if its a large block of code, you would include it in to the HTML page through the <script src="myScript.js"></script> type tag in the <head> of the document.

    After looking through the HTML I can see many things that can be altered to use them in a way so that you are then reducing your scriptint, one area being the <img tags, <img src="" id="pic1" width=100%> could as easily be <img name="picwin" src="pic1.jpg" class="picwin"> and a small piece of CSS in the head of the document to make the class .picwin { width:100%;}

    The document.getElementById("Next").style.display="none"; for example, you only need hook a reference to it once in the page but then access it as many times as needed, eg
    Code:
    nextButton = document.getElementById("Next");
    prevButton = document.getElementById("Previous");
    nextButton.style.display="none";
    prevButton.style.display="none";
    so when you have nextButton or prevButton referenced, you can apply or get information from it without constantly having to have the DOM trawled for that element as you will retain a reference to it in those variables

    Avoid using names with spaces in them like Gourmet coffee.jpg use names like Gourmet_coffee.jpg to avoid possible truncation issues.

    Here is a rough demo example of how to use document images http://www.webdeveloper.com/forum/sh...03#post1491003 to save on code, it illstrates how you can set up your document <img tags with their source, use the name= tag and gather them references in to an array that doesn't need to count but simply rotate the array elements to get the current image to display.

    That should give you an idea of how you can set up your HTML with CSS to hide non relevant data, access all images and data in the page and use CSS to alter your display output rather than having to use sprawling scripts and loops.

    You should consider looking in to using CSS to control your output display, try using a Box model (DIV's) over using a table, while tables are handy, when it comes to scale and display on a computer / tablet or phone, this can have problems with not being easily formatted to fit and end up with a site accessed by a tablet and it ends up off page, you should consider the user and the device that is being used.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  5. #5
    Join Date
    Oct 2003
    Location
    Pensacola, Fl
    Posts
    241

    Metadata

    I really should use CSS more. I use it somewhat, but I'll try to make it more of a habit. I looked at the carousel example you supplied. That's interesting, but not quite what I'm looking to do. I need to be able to search for a category somehow, and then display just those images that are in that category. I'm disappointed in JavaScript right now. I've done everything properly by including my item files in the document and building an array. But it breaks down...not all array elements are accessible. I've even tried assigning the array directly in my <head>, but there seems to be a size limitation. I can include an array of some twenty to thirty rows, but after that I can't seem to access the other higher values; for instance, I've got 544 items...I can do something like place row [20] in an innerHTML, but if I try to access row [232], it's like it's not there. I don't know why, but it's an irritating limitation I've found so far. I don't know how to get around this. I thought about Metadata, but that doesn't seem to be an option. I don't know if there's any way to include the category in the filename, and then search each filename to find corresponding values for my search.

    I don't know if I'd have better solutions with PHP or not. That's a whole new bag I'd have to learn. I've got a book on it, so I could find my way around it with time. Do you have any other suggestion using JavaScript before I try to tackle it in PHP? - - okham
    Your friendly neighborhood Okham. -o-o-

  6. #6
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,243
    The point of the demo was to illustrate that you can cut out allot of programming because the information is already present.

    If you are attempting to build a shopping site using JavaScript, thats a bad idea from the outset, mainly because of security issues and secondly your clients may have javascript turned off which would mean that your site will appear as a blank page.

    Use PHP for your shopping site. If available use JavaScript for a client side basket but do all your validation server-side.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  7. #7
    Join Date
    Oct 2003
    Location
    Pensacola, Fl
    Posts
    241

    for() loops

    Well, as luck would have it, the problem has worked itself out. I included my item files in my documents as separate scripts, and I've been able to access the array info more reliably. I just have to have a separate include script for each item. Not an elegant solution, but it will do for the short term. I've got to let my site stand on JavaScript for the time being, but I'll be working on moving it to PHP as I go. I agree, PHP would be better in the long run. Thanks for your input on all this. I've always found this forum to be useful when I'm stuck on a problem. I'm curious to see how PHP stacks up against JavaScript. It'll be a new experience. One last thing...you mentioned an alternative to tables. What was that? Could you direct me to some info on the alternative?
    Your friendly neighborhood Okham. -o-o-

  8. #8
    Join Date
    Jan 2017
    Location
    Madison, Wisconsin state
    Posts
    105
    Hi okham,
    An alternative to "<table> .. </table>" is the CSS Responsive Design/Development of "<div> .. </div>". Someone by the name of "Jamesicus" (who has since vanished since appearing on the 3rd of this month) had given an opportunity to view and copy (procure) an [excellent] example of this in action in a simple (yet extensive web page (.. one of the pages (in Post/Reply of Jamesicus) has even been removed, or otherwise guarded, from a publishing view/visitation on the Internet (the last time I checked) - but to the ept and diligent reasearcher a means still is afforded to observe this in action - although not as extensively excellented as was exampled (linked) here that has vanished). I have sought it out and the site is harmlesss but very informative and nicely laid out code wise (beautiful - I would say in great care).

    I have been for the last couple of days working through, or otherwise - manipulating, some of the codings I have obtained through here to update my thought processes (get back into the swing of things). One of the manipulations is the "Jamesicus" measure (it is common knowledge to most but for me it was an implementation just waiting to happen and I was at the right place at the right time). Here's what I have and please feel free to access the codes (HTML/CSS)
    - Douglas

  9. #9
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,243
    The problem with JavaScript is twofold.

    Firstly a user (and many do this) not have JavaScript enabled, therefore your site will appear as a blank page.

    Secondly, JavaScript as a means of running a site as a secured shopping system has never been successful as it is like any system, open to abuse.

    PHP would be the most appropriate way of running a site that sells. It does have some security problems of its own but that is in your control and not the clients and it won't matter if JavaScript is enabled or not, your site code if you use PHP with JavaScript can be used in a fallback scenario with JavaScript operating a storage space / basket that the server then processes and if JavaScript does not feature on that browser, PHP then picks up the pieces and puts things in to a basket.

    In any shopper site, you do not want the tally to be run client side and then accepted at face value, you should always do any validation on the server-side (where you are in control) and thats where you can then detect any falsification of an order that can see your site code being manipulated at the client end. Don't be surprised if you find yourself losing money from relying on plain old javascript,

    Ever stopped to think why all the on-line shops operate the way they do? In a word... Security and not the shoppers security but the businesses security.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  10. #10
    Join Date
    Oct 2003
    Location
    Pensacola, Fl
    Posts
    241
    I looked at some web info on <div>, Douglas. Using CSS I can see how that would be an interesting alternative for tables. I may try something along those lines sometime to see how it handles. An advantage I can see is being able to span columns or rows more easily than it is for tables. That can be confusing at times. What environment do you use for development? - - okham
    Your friendly neighborhood Okham. -o-o-

  11. #11
    Join Date
    Oct 2003
    Location
    Pensacola, Fl
    Posts
    241
    I agree about the JavaScript dilemma and security. In a way, what I'm doing now is not really intended to be a working commercial site. I originally built something using just HTML5, but with the limitations I got intrigued with what I could do using JavaScript. Now I want to know what I can do with PHP. I've evolved quite a bit since first fiddling with websites. I used to want the most complicated plans that would capture the fancy of the user. Now, I want the most simple, that gets the job done efficiently. People appreciate simplicity, I think. A lot has got to do with internet speed now. Back when speeds were much slower, I tried to do as much loading frames and such to stay on one page, rather than loading a whole new page. Now, it's no big deal to load a new page. I noticed that PayPal went to encrypted buy buttons that allow for more security in selling. But I prefer building a form myself so I can customize much more. But then there's the security issue. - - I've got a problem right now in that PayPal doesn't seem to want to work with iPad. I loaded my site, tested a buy, but the form submissions don't go anywhere on the iPad. Haven't found a solution to that problem yet. JavaScript seems to run well on the pad, though. - - okham
    Your friendly neighborhood Okham. -o-o-

  12. #12
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,243
    Generally anything paypal has to be done in accordance with paypals terms and you may need one of their API's
    You should IMHO consider setting up a paypal cart option that you link to your site and integrates with the site so that its paypals basket system doing the leg work for you.

    https://www.paypal.com/uk/webapps/mp...ayment-buttons
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  13. #13
    Join Date
    Jan 2017
    Location
    Madison, Wisconsin state
    Posts
    105
    Hi okham,
    I use for an Editor (current version): Notepad Plus Plus (notepad ++). My Browser is (current version): Firefox. I'm on a Windows OS (Win7). 42"Plasma (I love the real-estate (i.e., viewing potential) it provides). On occasion I fire up the WAMP Server (Windows, Apache [Server], MySQL, PHP (WAMP)) to test PHP when I'm in that side of the coding development. I use Adobe Photoshop CS5 for my Graphics Optimizations. I use Microsoft Word to isolate cool Fonts I'd like to implement.
    I use basic and advanced web sites such as w3schools.com and php.net. I do search the Internet not with keywords specific but rather form a questionable sentence in my Search Entry Text area of my Browser (I don't use the "address bar" for searches). Normally I'd use Google, but Since I've got Norton I've been using the Norton Safe Browsing Aspect (ask.com that is hooked-up somehow with Norton) - I turned that off today cause of "strange foreign language results coming out it as of today ... go figure ... .
    My initial enviroment: In 2009 I stumbled into Zymic's Webmaster Forum (I have to believe they are now pretty much defunct) and the place came un-glued in about 2012 (people (original programmers of the site) eventually left, moved on, fell into other things ..., and things became not as important as it started out as I supposition). Anyways I was nurtured by some of the top-notchers there and (I'm going to believe due to my caliber and integrity and desire to receive instruction and guidance rather than the normal mentality of "give me" which is pretty prevalent in instant gratification. I learned and practiced alot there - started with small seemingly insignificant (got'ta learn the fundamentals of HTML then CSS then work bigger then tackle the advanced languages) steps and tenacious patience.
    From there I knew that soft-copy learning (reading and searching from the Internet) was not my cup-of-tea. I needed hard-copy references (books) with at-my-fingertips Indices, Addendums, and, Table of Contents. I visit church booksales (real cheap there books from $0.10 (paperbacks) to $1.00 or $2.00 (hard-backs)), visit my local "used" Bookstores (anywheres from $3.00 to $40.00 - normally), and, of course there is the "new" Book purchases (if I really can justify the need of "in front of me ASAP"). I've got HTML/XHTML, JQuery, PHP, MySQL, and just very recently this month purchased used Javascript Books and one used Javascript & Ajax Book. I find a Reference Library is a must for an ol'dog like me (and it saves my Printer Ink and/or Laser Toner).
    I'm a one girl man in that once I've located something I'm there and I'll fight to the death to keep it. .... Poor Webdeveloper.com - I'm Yours (Hahahahaha) for better or worse ...
    I do test online mostly since I've got my own Paid-Hosting Accounts and my Domain names (but I only do that with non-intrusive code otherwise it's the WAMP Server testing before I endanger the outside world with my being "responsible in my irresponsiblities").
    Time and patience in experimenting with "what if I do this" in a code and paying attention to what was before I did it compared to what happened when I did it pondering alwys to What then if I did this to that what would happen is my key to advancing in this code world. I keep in mind to be careful (so I suspect neglect in anything before me - this gives me an edge I feel to notice the contempt of what is being induced about around me - above all the finger points back to me as I was there.

    I think that pretty much covers the nutshell.
    - Douglas

  14. #14
    Join Date
    Oct 2003
    Location
    Pensacola, Fl
    Posts
    241
    I'm generally finding it difficult to track down bugs in my JavaScript. A bracket flipped around the wrong way can prevent an entire page from loading right. I've got a few <div>s of text now that's not showing up on a page, and I've gone through the html and JavaScript so many times, but can't find what's preventing the display. Most of the time I end up blanking the page and just adding elements back into it incrementally until I find just what's being a block. It's a big pain. Where do you get your information on what's been deprecated from HTML5 or JavaScript?
    Your friendly neighborhood Okham. -o-o-

  15. #15
    Join Date
    Oct 2003
    Location
    Pensacola, Fl
    Posts
    241
    I used to use Arachnophilia, Douglas, but I had some anomalies that were bugging me and I thought it may have been that environment. So now I just use Word in text mode to build a page. Not convenient, as in when I save an html page, I have to go to Explorer to manually change the extension to just .html. I may try that XAMMP when I get into PHP. I've always been disappointed when buying books on coding...they always seem to have examples in them that are deprecated, or don't work at all. It's impossible to learn what actually works sometimes. I used a subscription for Adobe Dreamweaver once, but not only was it expensive, I just didn't think the environment was that user friendly. I do most of my photo optimization with CorelDraw or CorelPhoto. You mentioned your large screen monitor...I've always been curious how some of my optimizations looked when they're blown up for screen size. I try to build things resizeable so that they work on whatever format display one is using. I'm disenchanted with iPad these days. I'm more inclined with Microsoft Surface...I assume it uses Edge for a browser. I spend less time on cross-browser compatibility than I should, but I have a hard enough time working well with just Edge, not to mention trying to be compatible with Firefox, Mozilla, and whatever else is out there. I'll worry about that when the time comes.- -okham
    Your friendly neighborhood Okham. -o-o-

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles