Excellent! Love number 2.
John Bracey
Posts
-
Windows 8 WTF of the day!?!?!? -
Locking size of browser windowHere you go - try this article... http://www.howtocreate.co.uk/tutorials/javascript/browserwindow[^]
-
Tactical Nuclear PenguinVery dangerous around students, nurses and anyone the armed forces!
-
Creating a dynamically expanding div tagI see what you're saying. My method would just resize your div box to z set size no matter how many items need to be listed. I think you need to count the number of items there are in the list when the page loads. This is something probably best doing server side in whatever language you're using. Then pass the number to client side in a hidden field. eg <asp:Label runat="server" id="myhiddennumber" visible="false"/> Use this number to set the height of the div box in javascript. This function needs to execute after the hidden field has been populated. eg function mylistboxsize(){ var getthelist = document.getElementById("myhiddennumber"); // multiply the number in the hidden field to get a height value for the div box. Here we're saying each item is worth 10px var heightfordiv = getthelist.innerText * 10; // set the height document.getElementById('divboxid').style.height = heightfordiv + 'px'; } The above javascript may need a bit of syntax correction however I think the 'method idea' would work.
-
Creating a dynamically expanding div tagYes you could do a client side button with some javascript. On clicking the button a function is fired up that gets the element ID of your div box and then increases it's height via CSS. The function would invoke something like: function myfunction(){ document.getElementById('idofyourdivbox').style.height = "120px"; }
-
Different colors of text in textbox [modified]Not sure you can do this on a live textbox.
-
Different colors of text in textbox [modified]You should be able to assign a CSS style to textbox to control the colour of the text. You could have a new style activated using an event handler.
-
Dynamically Added form controls using Javascript do not get recognized as form elements?Yeah I come across many 'quirks' all the time. I'm a .NET man and although I love the platform and it is very good - us developers always come across the cracks in the system. Work arounds are sometimes the only way. Cheers JB
-
Dynamically Added form controls using Javascript do not get recognized as form elements?Your JS looks good and is doing it's job. The problems not the simple server-client relationship I thought it was. :( What's happening is the server side script isn't set up to receive additional rows.. It's possibly only aware of the fields that are there when the page first loads. Sorry to answer your problem with another problem. I'm not too hot on PHP - sorry I can't help you any further.
-
Dynamically Added form controls using Javascript do not get recognized as form elements?There could be a number of reasons. Would you mind if you posted a snipet of your code - ?
-
Dynamically Added form controls using Javascript do not get recognized as form elements?Not entirely sure here but when the button is clicked to do it's job - add the textbox to the form - is this a server side command or client side? If it's client side then your server won't necessarily see the ID's of the dynamically created textboxes - unless it's explicity told to do so. Possibly the problem...
-
Cool Iris ....Never heard of it but if you check out Google - the top search comes up with a site selling you a Flash 3d viewing app. Maybe that's what they want you to use - or something like it.
-
Timeout Alert Issue....Javascript Function with ASP.net applicationThe following javascript will simply run in background and redirect the user whereever you want - (The '3000' value is in milliseconds.) var t=setTimeout("document.location.href ='somewhereelse.aspx'",3000); Note this method is client side and works on the users browser. Clients can sometimes turn off javascript.. server side maybe needed. I won't go into the server side options here - too many! This codeproject article however is excellent for giving you a through introduction: Beginners Introduction to State Management Techniques in ASP.NET[^] I think where you're having problems is the iframe though. Your time condition needs to sit on either one or the other. In your case I would suggest the main page - the parent page to the iframe. Set a timer - client or server side here and the child iframe will have to inherit the command.
-
MS Visual Web Developer 2008 Express EditionYour best bet would be to drop it in when in code view. That way you know exactly where it is. I do know what you're saying though - the display of controls in design view can be awful - sometimes not representing what the page will look like at all. I don't think there is any quick fix to this and the 'tinkering and tailoring' of it comes with experience.
-
How to develop own News section in C# ASP.Net 2.0 ??This is by far the easiest method. Anyone trying to implement this must be aware that directory on the server the application wants to use must have it's asp.net trust levels lowered to 'medium' - most server administrators will have this set to 'high' - which is probably default. This was a stumbling block I came across when I tried using this.
-
regarding browser compatibility.Use W3C standard CSS to control the look and feel of the page. Make everything fluid where possible. Use percentages for font sizes and widths/heights of elements. 'Fixing' to many elements with fixed values can cause a lot of problems. Remember NOT all browsers will behave the same for everything - I'm afraid SOME elements won't. For the ones that don't you'll have to do a little research. For example to change the colour of a horizontal rule correctly you would have <hr style="color:#ff0000"/> - works fine in IE browsers but not in FF - the fix is <hr style="color:#ff0000;border:0px;height:2px;background-color:#ff0000"/> - note we have to add the border, height and background-color attributes - still correct and works in all browsers. All this comes with a little a research and experience. I would just start off by researching each problem element as it comes along specifically and as you need. Not the whole lot.
-
website SearchOne quick way would be use Google. Google provide an API for web developers to install a custom search into their site. This entirely depends on if can use this in first place and indeed if you want to. Could be a quick win.
-
Problem in maintaining same size of pageDifferent monitors will always display web pages and applications differently. To get round this always use a style sheet or inline styles if needed. Set widths, heights and font sizes to percentages. Within reason your page should display the same what ever the monitor.
-
ASP or ASP.NETWould definately have to be ASP.NET. You get to tap into proper programming namespaces and classes using VB, C# and other languages and use these in your web application - far far more powerful than classical ASP. You can use some classical ASP coding in ASP.NET but not all coding. ASP.NET is not fully backwards compatible with classical ASP. For future proofing it would a far wiser to go with ASP.NET.
-
How do I expand my main div to fill remaining space, using a two column CSS model?Try this style sheet with divs below it.... <style type="text/css"> body { margin:0px; padding:0px; color:#000; background:#fff; height:100%; } #left { position:absolute; left:0px; top:0px; padding:0px; width:200px; height:100%; background:#eaeaea; border:1px solid #333; } .content { position: relative; margin-left:220px; background:#ffc; border:1px solid #333; padding:10px; } </style> <div id="left"> Menu in here. Fixed width. </div> <div class="content"> <h1>Main content here. 100% liquid width.</h1> </div>