Jump to content

manojdubey

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by manojdubey

  1. Hi All,Can anybody tell me the use of $ in javascript programming.Below is the code snippet.function hideLayer(layerName) { rolloverContainer.style.visibility = "hidden"; rolloverContainer.style.display = "none"; var divObj = $(layerName); divObj.style.visibility = "hidden";//----Error is coming at this point divObj.style.display = "none"; }Its showing errors as 1.divObj has no properties or 2. object expected.Any Ideas???ThanksManoj DubeyNoida, India
  2. Hi Little goat,What I mean with the professional suggestion is that we are given some specified limits and strict rules while designing our pages. We all know that we can put anything out of the available hit and trials in solving a problem. But while fixing one defect we have to check that if our solution adheres to the standards and it will not create some regressions or will break some other functionality and will run at different environments in similar fashion.Anyway thanks for your valuable suggestions.Manoj
  3. Hi Little GoatI cannot adjust the content as my workarea is properly defined and everything is running fine in IE but other browsers are not able to do so.Please help if you can and give some professionally reliable suggestion.Manoj
  4. Hi,I am getting a problem of overlapping divs. IE is showing no such problem. But the browsers like FireFox, Mozilla and Netscape are showing. I am not using any tables in the webpage and the complete page is structured using divs whose properties are controlled using stylesheets. Below is the two stylesheets.the div d1 contains some other divs also.Please helpUrgentManoj#d1 { position: absolute; left: 190px; top: 154px; padding: 0px 0px 0px 0px; width: 425px; height: 280px; border: 3px solid #98172A; background: url(Image.gif) no-repeat top left; }#d2{ position: absolute; left: 190px; top: 436px; height: 77px; width: 361px; padding: 0px 0px 0px 0px; }
  5. You will have to control this in you programming language where you will have to count the resultset iterations and for each page click you will have to control it differently.Ex.For first page run it for 10 timesfor second page first move it 10 records and then read next 10 record and so on.what you can do in javascript is the to count the total no. of records initially and based upon that find the no. of pages for whom links are to be created and for each click store its page no value so that based upon that you could make dry runs on next page.Also you can get selected rows if your PL support like as in java.Thanks.Manoj
  6. I think you should use more specific styles to set your footer at exact position. Like you can use div or set margin attributes properly and also one thingFirefox does not support inline stylesheets like what we declare<input type=text style="margin:0px">instead use something like<style>.abc{margin:0px;}</style><input type=text class="abc">for morebetter you post ur problematic code here.at the forumGood luckManoj
  7. Hi I am trying to read a text from resource bundle inside a javascript function but the text contains single quotes and double quotes as is the normal case with italic and french language text.But its giving me problems becoz of unmatched no. of these quotes contained in text. I want to store the key value in a javascript var and work on it.can anybody help.sample code:<script> function validateLastName(form) { var lastName = form.elements["/com/sch/ua/profile/ProfileCreateFormHandler.lastName"].value; for (var i = 0; i < lastName.length; i++) { if (lastName.charCodeAt(i) > 563 ) { errors = errors + '\r\n <sch:content bundle="<%= resourceBundle %>" locale="<%= locale %>" id="i_registration_create_personal_info.validation.lastName"/> '; hasError = true; break; } } }</script>
  8. Hi Brendon BraniginTry the following code.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- saved from url=(0069)http://www.w3schools.com/dhtml/tryit_view.asp?filename=trydhtml_menu4 --><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=windows-1252"><script type=text/javascript>var timerfunction scrolltop(){document.getElementById('scrollmenu').style.pixelTop=document.body.scrollToptimer=setTimeout("scrolltop()",1)}function stoptimer(){clearTimeout(timer)}</SCRIPT><META content="MSHTML 6.00.2900.2722" name=GENERATOR></HEAD><BODY onload=scrolltop() onunload=stoptimer()><SPAN id=scrollmenu style="POSITION: absolute"><B>Menu</B><BR><A href="http://www.w3schools.com/">W3Schools</A><BR><A href="http://www.microsoft.com/">Microsoft</A><BR><A href="http://www.altavista.com/">Altavista</A><BR></SPAN><TABLE width="100%" border=0> <TBODY> <TR> <TD width=100> </TD> <TD>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR>Scroll this page to see the "always-on-top" menu <BR><BR><BR><BR><BR></TD></TR></TBODY></TABLE></BODY></HTML>
  9. manojdubey

    make frames

    Hi alnadagot ur problem. You can create frames in a document in the following manner.What happens is that whenever we create frames in our document. We get following features.1. We have atleast 3 documents a minimum of two frames and one the combined one that is called main frame page.2. we cannot have body tag simultaneously in frames.3. Each frame gets one id whereby we can refer it inside other frames also.4. We can specify the link opening frame using the _target attribute to the desired frame.5. We can create frames using two tags<frameset><frame>.Ok I think you can get the code to create the frames if not u can always get back to me at manoj.dubey@hcl.inGood LuckManoj
  10. How could I change the color or lable of input type file in html.I tried a lot but it either makes the path text also invisible or the file uploading errors.If anybody can helpWith Regards Manoj Dubey
  11. How could I change the color or lable of input type file in html.I tried a lot but it either makes the path text also invisible or the file uploading errors.If anybody can helpWith Regards Manoj Dubey
  12. Dear VijayYou could do it through iframes and <div contenteditable=true>Try searching at google over this you will certainly get some helpWith RegardsManoj Dubey
  13. manojdubey

    HTMl new pages

    DearMay Be I could I help you some bit If you could provide the sample code as your problem is not clear.You can mail me at manoj.dubey@hcl.in for personal help.With RegardsManoj Dubey
  14. Dear Vijay In Html in real we don`t have anything called Menus. Rather we use the <div> or<layer> element itself as menus and use their visibility attribute for this reason.Below I am Providing you a sample code may be this may help you create one. If need more help please do mail me at manoj.dubey@hcl.inThe below code I have used to display a color menu inside a select box.You can customize it as per your needWith RegardsManoj DubeySample code <style type="text/css">#dropmenudiv{position:absolute;border:1px solid black;border-bottom-width: 0;font:normal 8px Verdana;line-height:10px;z-index:100;}#dropmenudiv a{width: 100%;display: block;text-indent: 3px;border-bottom: 1px solid black;padding: 1px 0;text-decoration: none;font-weight: bold;}#dropmenudiv a:hover{ /*hover background color*/background-color: yellow;}.red{background-color:red;}.green{background-color:green;}.blue{background-color:blue;}.yellow{background-color:yellow;}</style><script type="text/javascript">/************************************************ AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)* This notice MUST stay intact for legal use* Visit [url="http://www.dynamicdrive.com/"]http://www.dynamicdrive.com/[/url] for full source code***********************************************///Contents for menu 1var menu1=new Array()menu1[0]='<input type="button" style=" background-color:yellow;width:80px; font-size:8px;border:0px;" onClick="f1(1)" value="Yellow">'menu1[1]='<input type="button" style=" background-color:Blue;width:80px; font-size:8px;border:0px;" onClick="f1(4)" value="Blue">'menu1[2]='<input type="button" style=" background-color:green;width:80px; font-size:8px;border:0px;" onClick="f1(2)" value="green">'menu1[3]='<input type="button" style=" background-color:red;width:80px; font-size:8px; border:0px;" onClick="f1(3)" value="red">' var menuwidth='10px' //default menu widthvar menubgcolor='lightyellow' //menu bgcolorvar disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)var hidemenu_onclick="yes" //hide menu when user clicks within menu?/////No further editting neededvar ie4=document.allvar ns6=document.getElementById&&!document.allif (ie4||ns6)document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')function f1(val){ if(val==3) document.forms[0].t1.className='red'; else if(val==1) document.forms[0].t1.className='yellow'; else if(val==4) document.forms[0].t1.className='blue'; else if(val==2) document.forms[0].t1.className='green';}function getposOffset(what, offsettype){var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;var parentEl=what.offsetParent;while (parentEl!=null){totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}return totaloffset;}function showhide(obj, e, visible, hidden, menuwidth){if (ie4||ns6)dropmenuobj.style.left=dropmenuobj.style.top=-500if (menuwidth!=""){ dropmenuobj.widthobj=dropmenuobj.styledropmenuobj.widthobj.width=menuwidth}if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")obj.visibility=visibleelse if (e.type=="click")obj.visibility=hidden}function iecompattest(){return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}function clearbrowseredge(obj, whichedge){var edgeoffset=0if (whichedge=="rightedge"){var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15dropmenuobj.contentmeasure=dropmenuobj.offsetWidthif (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth}else{var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffsetvar windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18dropmenuobj.contentmeasure=dropmenuobj.offsetHeightif (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeightif ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge}}return edgeoffset}function populatemenu(what){if (ie4||ns6)dropmenuobj.innerHTML=what.join("")}function dropdownmenu(obj, e, menucontents, menuwidth){if (window.event) event.cancelBubble=trueelse if (e.stopPropagation) e.stopPropagation()clearhidemenu()dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudivpopulatemenu(menucontents)if (ie4||ns6){showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)dropmenuobj.x=getposOffset(obj, "left")dropmenuobj.y=getposOffset(obj, "top")dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"}return clickreturnvalue()}function clickreturnvalue(){if (ie4||ns6) return falseelse return true}function contains_ns6(a, {while (b.parentNode)if ((b = b.parentNode) == a)return true;return false;}function dynamichide(e){if (ie4&&!dropmenuobj.contains(e.toElement))delayhidemenu()else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))delayhidemenu()}function hidemenu(e){if (typeof dropmenuobj!="undefined"){if (ie4||ns6)dropmenuobj.style.visibility="hidden"}}function delayhidemenu(){if (ie4||ns6)delayhide=setTimeout("hidemenu()",disappeardelay)}function clearhidemenu(){if (typeof delayhide!="undefined")clearTimeout(delayhide)}if (hidemenu_onclick=="yes")document.onclick=hidemenu</script></HEAD><BODY><input type="button" readOnly name="t1" style="font-family: Tahoma; font-size: 8px; border-style:ridge; font-weight: normal; width:80px; border-color: #FFFFFF;"onClick="dropdownmenu(this, event, menu1, '80px'),document.forms[0].t1.focus();"> </body>
  15. Any way thanks Mimika But it is what I want
  16. ThanQ Mimika,But you somewhere misunderstood my problem. I don`t want to make the content just visible rather I want to see the whole content to look in same color irrespective of whether it is selected or not. Actually I am preparing a color chooser for the my page .ThanksManoj
  17. Hi I got the following code <select> <option style="background-color:yellow; padding:10px;"> Yellow</option><option style="background-color:green; padding:10px;" >green</option><option style="background-color:blue; padding:10px;" >blue</option><option style="background-color:red; padding:10px;" >red</option></select>The code creates a select box with options in different colors. But when I select the options that color gets hidden by the selection color eg. blue. I want to avoid this. If anybody can help?Manoj Dubey
×
×
  • Create New...