tag:blogger.com,1999:blog-90259998656845894912024-03-08T07:51:40.187-08:00Programming CentralA place for programmers to share ideas and discuss programming tools. Actual code instead of just explanations. All platforms are welcome.Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-9025999865684589491.post-47548942249447989772013-02-19T01:02:00.001-08:002013-02-19T01:02:43.972-08:00Joses Estriplet<div style="color:#000; background-color:#fff; font-family:bookman old style, new york, times, serif;font-size:12pt"><div><a href="http://top-shopping-usa.com/pgl/6u6as3r=kad1">http://top-shopping-usa.com/pgl/6u6as3r=kad1</a></div><div></div></div>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com4tag:blogger.com,1999:blog-9025999865684589491.post-22394733038571431492009-02-02T11:41:00.000-08:002009-02-02T11:44:38.701-08:00GeotargetingAs the internet economy heats up again to the approximate temperature of the surface of the sun, quite a few aspiring publishers and newer content sites have asked me about how to target their advertising geographically.<br /><br />Geotargeting is one of the most commonly used targeting options, so regardless of whether you're an ad seller or an ad buyer, you should be familiar with geotargeting and how it works. There are a variety of methods used to determine the location of a web page viewer, and not all methods are created equal. If you're a seller, you want to offer the most accurate targeting possible to your advertising clients. If you're a buyer, you want to ensure that the targeted ads you buy are consistent with your client's expectations for spill (ads served into markets other than the ones you're targeting).Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com1tag:blogger.com,1999:blog-9025999865684589491.post-44768563666931938402008-11-08T21:30:00.000-08:002008-11-08T21:34:09.735-08:00ActionScript Unshift methodTo add one or more elements to the begining of an array, you will have to use <strong><u>unshift</u></strong> method of Array class.<br /><br /><br />var albums:Array = new Array("Record1","Record2","Record3","Record4"); <br />albums.unshift("Record5");<br /> <br />trace(albums); //Record5,Record1,Record2,Record3,Record4Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com1tag:blogger.com,1999:blog-9025999865684589491.post-45445663098154754282007-09-06T05:54:00.000-07:002007-09-06T05:56:12.558-07:00ActionScript and FlashI'm looking to get into ActionScript and Flash. Does anyone know of any useful resources?Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com4tag:blogger.com,1999:blog-9025999865684589491.post-54875829073920244772007-06-26T05:34:00.000-07:002007-06-26T05:57:14.629-07:00Animations in JavaScriptToday, professional designers use <a href="http://www.adobe.com/products/flash/">Flash</a> to create dazzling animations. In the glory days before AJAX was in vogue and when animated gifs were the "cause célèbre" of avant garde <a href="http://www.adobe.com/products/photoshop/family/">Photoshop</a> gurus, we had JavaScript.<br /><br />There are two methods of interest here: setInterval () and clearInterval().<br /><br />Presumably, we would need to play the frames of a sequence in a loop. We would call<br />setInterval() like this:<br /><br /><span style="color:#3366ff;">var</span> Interval = <span style="color:#3333ff;">setInterval </span>("MultiSelect()", 500);<br /><br /><br />By saving a reference to the current interval, we can pause the animation with clearInterval().<br /><br /><span style="color:#3333ff;">clearInterval</span> (Interval);<br /><br /><br /><br /><span style="font-size:85%;">Refer your friends to this blog:</span><br /><a href="http://programmingcentral.blogspot.com/"><span style="font-size:85%;">http://programmingcentral.blogspot.com</span></a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com2tag:blogger.com,1999:blog-9025999865684589491.post-4078822303496693082007-06-08T16:26:00.000-07:002007-06-08T16:31:16.225-07:00Help Authoring suiteI have looked into help authoring suites for some time. Of course, there is the well known RoboHelp (<a href="http://www.adobe.com/products/robohelp/"><span style="font-size:85%;">http://www.adobe.com/products/robohelp/</span></a>) and the free Win Help tool that comes with Visual Studio.<br /><br />Are there any suites that provide descent features with a descent price?<br /><br /><br /><span style="font-size:85%;">Refer your friends to this blog:</span><br /><a href="http://programingcentral.blogspot.com/"><span style="font-size:85%;">http://programingcentral.blogspot.com/</span></a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com0tag:blogger.com,1999:blog-9025999865684589491.post-90177105359294468322007-06-08T16:17:00.000-07:002007-06-08T16:25:58.177-07:00.NET UI SuiteI have been looking for a .NET UI suite for some time. Some people suggested Infragistics. For me, I have found the package from DevExpress to be the best one of all. I am particularly impressed by the printing components. Those of you who struggled with printing in Visual Studio 2003 understand the importance of an easy-to-use printing suite. Although GDI+ is beautiful in theory, it does take some getting use to.<br /><br />There are some many cool things about this suite. I don't know where to start. Most impressive is their implementation of the Office 2007 interface. Not only is it faithful to the appearance and implementation details of the ribbon, the performance is superb. This product will definitely add years to your peace of mind.<br /><br />Check it out at <a href="http://www.devexpress.com/">http://www.devexpress.com/</a><br /><br /><br />Refer your friends to this blog:<br /><a href="http://programmingcentral.blogspot.com/">http://programmingcentral.blogspot.com/</a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com0tag:blogger.com,1999:blog-9025999865684589491.post-58478346871983341322007-06-05T05:34:00.000-07:002007-06-06T05:28:35.250-07:00An excellent JavaScript treeImplementing a JavaScript tree is one of those really vexing challenges. Some implementations limit your ability to nest nodes deep into the tree or are awkward in other ways.<br /><br />I think this is the best solution I've seen so far.<br /><br /><a href="http://www.destroydrop.com/javascripts/tree/">http://www.destroydrop.com/javascripts/tree/</a><br /><br /><br /><span style="font-size:85%;">Refer your friends to this blog:<br /></span><a href="http://programmingcentral.blogspot.com/"><span style="font-size:85%;">http://programmingcentral.blogspot.com/</span></a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com1tag:blogger.com,1999:blog-9025999865684589491.post-39332104103885650402007-06-01T05:21:00.000-07:002007-06-06T05:28:51.030-07:00Pass variables by reference in ASPAh! Passing variables by reference. One of those interesting nuggets not often adequately explained by textbooks or professors. Obviously, it is possible with VB.NET and VB 6 when the keyword "ByRef" is used to qualify a parameter.<br /><br />Remember that incoherent explanation regarding "stacks" and "heaps"? Well, neither do I.<br /><br />I had to figure it out on my own. I imagine it this way. Let's assume we're going to a department store. When we enter, we check in our bags. The kind person at the counter then hands us a ticket number corresponding to the compartment where our bags are placed. The ticket is a "reference" to our bags and the square compartment can be likened to "memory".<br /><br />If we were to lose our "reference" to our bags, i.e., lose our ticket, the kind person at the counter, overcome by a sense of glee, would keep our bags for himself.<br /><br />When we return the ticket, the kind person at the counter looks for a compartment that matches the label on the ticket and returns our bags (Hopefully with everything still in it)<br /><br />In any event, here's my solution:<br /><br /><%<br /><br />Dim var1, var2<br /><br />MyRoutine var1, var2<br /><br />Response.Write ("Values are : " & var1 & " and " & var2)<br /><br />%><br /><br /><%<br /><p>Sub MyRoutine(v1, v2)<br /><br />v1 = "Variable 1" </p><p>v2 = "Variable 2" </p><p>End Sub</p><p>%></p><br /><span style="font-size:85%;">Refer your friends to this blog:<br /></span><a href="http://programmingcentral.blogspot.com/"><span style="font-size:85%;">http://programmingcentral.blogspot.com/</span></a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com0tag:blogger.com,1999:blog-9025999865684589491.post-51290506430962541932007-05-31T19:52:00.000-07:002007-06-06T05:28:06.529-07:00How to prevent right-click with JavaScriptI have searched the web for this solution. I dont' remember where I found it but here is. This code disables right-click through JavaScript. Place it in the "head" section of your web page. The code works with Internet Explorer and Firefox.<br /><br /><script language="javascript"> <p>var isNS = (navigator.appName == "Netscape") ? 1 : 0; </p><p>if(navigator.appName == "Netscape")<br /><br />document.captureEvents(Event.MOUSEDOWNEvent.MOUSEUP);<br /></p><p>function mischandler( )<br />{ return false; }<br /></p><p>function mousehandler(e)</p><p>{</p><p>var myevent = (isNS) ? e : event;</p><p>var eventbutton = (isNS) ? myevent.which : myevent.button;</p><p>if((eventbutton==2)(eventbutton==3))<br />return false;</p><p>}</p><p>document.oncontextmenu = mischandler;</p><p>document.onmousedown = mousehandler;<br />document.onmouseup = mousehandler;</p><p></script></p><br /><br /><span style="font-size:85%;">Refer your friends to this blog:<br /></span><a href="http://programmingcentral.blogspot.com/"><span style="font-size:85%;">http://programmingcentral.blogspot.com/</span></a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com16tag:blogger.com,1999:blog-9025999865684589491.post-64878865401370682432007-05-31T15:09:00.000-07:002007-06-06T05:30:10.104-07:00Prevent browser F5 refreshFew things are more annoying than needing to prevent your web site's visitors from refreshing a page resulting from a form "post".<br /><br />This solution works with Internet Explorer. Simply place this code in the "head" section of your page.<br /><br /><pre><script language=javascript><br />document.onkeydown = function(){</pre><pre>if(window.event && window.event.keyCode == 116)<br /> { // Capture and remap F5<br /> window.event.keyCode = 505;<br /> }</pre><pre>if(window.event && window.event.keyCode == 505)<br /> { // New action for F5<br /> return false;<br /> // Must return false or the browser will refresh anyway<br /> }<br /> }</pre><pre></script></pre><span style="font-size:85%;">Refer your friends to this blog: </span><br /><a href="http://programmingcentral.blogspot.com/"><span style="font-size:85%;">http://programmingcentral.blogspot.com/</span></a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com0tag:blogger.com,1999:blog-9025999865684589491.post-8662473987978252212007-05-30T05:43:00.000-07:002007-06-06T05:31:28.767-07:00How to loop through HTML Forms collection and validate control valuesI have often wondered how to validate form controls that were dynamically generated from a server-side script. Here's my solution in JavaScript:<br /><br />for (j=0; j<document.theform.elements.length; j++)<br />if ( document.theForm.elements[j].type == "text" )<br />{<br />//Perform validation when the control's type is text<br />}<br /><br />if ( document.theForm.elements[j].type == "checkbox" )<br />{<br />//Perform validation when the control's type is checkbox<br />}<br /><br />if ( isNaN (document.theForm.elements[j].value) )<br />{<br />//Perform validation if the control's value property does not evaluate to a number<br />}<br /><br />if ( Number (document.theForm.elements[j].value) < 0 )<br />{<br />//Perform validation if the control's value property evaluates to a number less than 0<br />}<br />}<br /><br /><span style="font-size:85%;">Refer your friends to this blog: </span><br /><a href="http://programmingcentral.blogspot.com/"><span style="font-size:85%;">http://programmingcentral.blogspot.com/</span></a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com177tag:blogger.com,1999:blog-9025999865684589491.post-87305331689567968272007-05-29T16:58:00.000-07:002007-06-06T05:32:54.145-07:00How to become a blog authorProgramming Central welcomes contributions from all programmers. If you would like to become an author, leave a comment besides any of our posts.<br /><br /><span style="font-size:85%;">Refer your friends to this blog: </span><br /><a href="http://programmingcentral.blogspot.com/"><span style="font-size:85%;">http://programmingcentral.blogspot.com/</span></a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com2tag:blogger.com,1999:blog-9025999865684589491.post-20742997120111144332007-05-24T05:33:00.000-07:002007-06-06T05:38:08.361-07:00Printing the contents of a IFrame whose content changes dynamically<p>One of the problems that vexed me recently was how to print<br /><br />the contents of an IFrame when the content changes dynamically.</p><br /><ol><li>Here is my solution:<br /><br />Declare a DIV area in the body of the HTML document with an ID attribute value of<br />"IFrameArea".<br /><br />Declare a JavaScript function that dynamically assigns an IFrame as the innerHTML<br />property of the DIV. Note that the dimensions of the IFrame are small. This<br />has the effect of making it invisible.</li><br /></ol><br /><p style="MARGIN-LEFT: 0.75in">function PrintIFrame(SRC)</p><p style="MARGIN-LEFT: 0.75in">{<span style="mso-tab-count: 1"><br /></span>var URL;<span style="mso-tab-count: 1"><br /><br /></span>URL =<span style="mso-spacerun: yes"> </span>(SRC).toString();<span style="mso-tab-count: 1"><br /><br />document.getElementById('IFrameArea').innerHTML = "<iframe src='"<br /><br />+ URL + "' height='1' width='1' frameborder='0' ID='MyIFrame' name='MyIFrame'><br /></iframe>"<br /><br /></span>} <?xml:namespace prefix = o /><o:p><br /></p></o:p><br /><ol style="MARGIN-TOP: 0in" type="1" start="3"><br /><li style="mso-list: l0 level1 lfo1; tab-stops: list .5in">The document that is loaded in the IFrame should have an “onLoad” event<br />handler declared<br /></li><ol style="MARGIN-TOP: 0in" type="a"><li style="mso-list: l0 level2 lfo1; tab-stops: list 1.0in">onLoad="javascript:PrintDocument()"<br />delcared in the "Body" tab<br /></li></ol><li style="mso-list: l0 level1 lfo1; tab-stops: list .5in">The document that is loaded in the IFrame should have a a function to perform<br />the printing</li></ol><p><br />function SetupToPrint()<br /><br />{<br />parent.frames.PrintCounter.focus();<br />window.print();<br />}</p><p align="left"><span><span><span style="font-size:85%;">Refer your friends to this blog: </span></span></span></p><p align="left"><span><span><span style="font-size:85%;">http://programmingcentral.blogspot.com/</span></span></span></p>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com7tag:blogger.com,1999:blog-9025999865684589491.post-17192577248449041512007-05-22T19:33:00.000-07:002007-06-06T05:39:27.989-07:00Welcome EveryoneProgramming Central is a place for programmers to meet and share their ideas.<br /><br />Instead of spending hours trying to solve those "difficult" programming problems, stop by and see what your fellow community members think.<br /><br />We encourage everyone to post questions and answers. Share your hard-earned insights to help make this a thriving community.<br /><br />All languages and platforms are welcome: .NET, Java, web languages (HTML, JavaScript, VB Script, DHTML, AJAX), and open-source languages.<br /><br />Welcome to Programming Central!<br /><br /><span style="font-size:85%;">Refer your friends to this blog: </span><br /><a href="http://programmingcentral.blogspot.com/"><span style="font-size:85%;">http://programmingcentral.blogspot.com/</span></a>Joehttp://www.blogger.com/profile/11778028453217658595noreply@blogger.com0