JavaScript - How To Change The Bgcolor Of The Dojo Dialog Title Bar
hey
another know how can i change the background color of the title bar in the dojo dialog box? cause i search and i couldn't find any way.... Please help me and reply asap Thanks p.s if can show me sample code of how to change Similar Tutorialshii i am doing a project and i meet some problem i create a dojo dialog box i need to style the dialog box into whole thing white but i am not able to style the border (the grey line) between the title and content so i was wondering how am i goin to style it into white? i don't use the css to style it so i was wondering how to write it like " noteDlg.titleBar.style.background = 'white'; " this kind to remove the grey line between the title and content thanks ps. I really need it very urgently...hope reply asap function note(){ noteDlg = new dijit.Dialog({ title: "Programatic Dialog Creation", draggable: false, style: "width: 300px; border:0px; " }); // set the content of the dialog: noteDlg.attr("content", "Hey, I wasn't there before, I was added at "); noteDlg.titleBar.style.background = 'white'; noteDlg.show(); } This page: http://homepage.ntlworld.com/kayseyc...document2.html seems to indicate that it's possible, but it looks like it also pops up an alert window which would be annoying as hell. Is there a way to, say, once every minute change the title bar text? You see I have a text file of rotating slogans that appear each time you reload a page on my site and someone suggested that having them change even when the page is already open might be fun. I thought I'd look into it and see if it's possible. The site is http://opalcat.com. I don't know enough about javascript to know if this is possible. I am fairly good at implementing and installing other people's code, though, and can usually make minor changes to tweak things. Please let me know if this is a doable thing, and if so, if you'd be willing to help me work it out. Thanks in advance, OpalCat One my website its one index page, putting in content depending on the link (ie ?page=xxxxx) and from that it generats the page name, (Page name - MySite). I also have an AJAX search form working on keyup (kinda like google autosearch). I want it so when i start typing there it changes the title to Search - MySite. Then when its empty revert to what ever it was before. Could someone gimmie a hand doing this? I already have the AJAX coding for the search bar so i can post that if iy would help more. EDIT: Also i need to check if its on the homepage or not, and if not load the homepage (currently done by php include), does javascript have an equivelant of php's include? In my latest project I have integrated dojo.There I have have a Dnd functionality in which I have to drag a dndItem into a textarea. For this I have converted the textarea to a dojoDnd Target with the dojoType attribute. Now the problem is the target textarea accepts dnd items only in explorer , opera and chrome.But this doesn't works in mozilla.Since my application runs only in mozilla I cannot proceed any more till I get out of this problem. Can you help me out of this? hi anyone know how to style the dojo button cause i declare the button it appear but i cannot use the style:"border:0px; background-color: black;" this is how i declare my dojo button var forward = new dijit.form.Button({ style: "border:0px;background:black;", label: "NEXT" }); Please help me with this !!! Please Reply ASAP!!! Thanks p.s if can show me some sample How to I use the tipsy (http://onehackoranother.com/projects/jquery/tipsy/) to read from the title tag in the Code: <a href="#", title="Hello<br>World">Hello World</a> From what I can do is to use the tipsy code: Code: $('#example-html').tipsy({html: true }); The final code which I wish to create may look something like the following: Code: for (var i=0; i<10; i++){ document.write("<a href='#', title='Hello<br>" + i + "' class='example-html'> Hello " + i + "</a>"); } Appreciate any help offer I have recentley decided to move from prototype to DOJO. I have the latest 1.3.2 and i am having problems accessing the themepage.html They tell you in their documents that you can install it on the server, place the files on the server or install it locally. So i installed it in my files on site. They tell you to go to: "http://your-webpage.com/js/dojo-1.3.2/dijit/themes/themeTester.html" when looking locally through my files their isn't a page like that. What page should i look at to view the widgets? Thank you for any help. I am doing a project and I have a problem. I have retrieved data from a json file using ajax and the xmlhttprequest, but I am not able to put the content I retrieve into the dojo content pane. The content pane is inside a border container. I have tried the following, but it does not work. The HTMLPage4.html has the json data inside. please help me really urgent to me!!!!!!!as soon as possible Code: function getInfoContent(graphic) { function ajaxRequests() { var activexmodes = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] //activeX versions to check for in IE if (window.ActiveXObject) { //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken) for (var i = 0; i < activexmodes.length; i++) { try { return new ActiveXObject(activexmodes[i]) } catch (e) { //suppress error } } } else if (window.XMLHttpRequest) // if Mozilla, Safari etc return new XMLHttpRequest() else return false } var mygetrequests = new ajaxRequests() mygetrequests.onreadystatechange = function() { if (mygetrequests.readyState == 4) { if (mygetrequests.status == 200 || window.location.href.indexOf("http") == -1) { var bookss = eval("(" + mygetrequests.responseText + ")") //retrieve result as an JavaScript object var rssent = bookss.infos.info for (var i = 0; i < rssent.length; i++) { // alert(mygetrequests.responseText); var placeImg = "" var txt = "" // placeImg += rssent[i].descImg txt += rssent[i].desc var shorttxt = "" shorttxt += txt.substring(0, 30); var bc = new dijit.layout.BorderContainer({ style: "font-size: 11pt; height: 574px; width:739px; border:0px;" }); var c1 = new dijit.layout.ContentPane({ region: "top", style: "height: 11.5%; width: 100%; color: black; background-color: transparent; border:0px;", content: "<table><div id = \"mydiv\">" + shorttxt + "<font color = '#0000FF' size = '1'><a onclick='showmore();'><u> More...</u></a></div></td></table>" }); bc.addChild(c1); } } else { alert("An error has occured making the request") } } return bc.domNode; } mygetrequests.open("GET", "HTMLPage4.htm", true) mygetrequests.send(null) } I am looking to use a similar method as facebook chat does, where it alternates between the original title text and 'friendsName has sent you a message!...' how can I do this ? Hi, The following doesn't work: Code: <!DOCTYPE HTML> <title>Sample flash</title> <embed id="foo" src="http://www.w3schools.com/media/bookmark.swf" width="400" height="40" type="application/x-shockwave-flash" /> <script type="text/javascript"> document.getElementById("foo").setAttribute("bgcolor", "#00FF00"); </script> But if you change setAttribute to ("width", "800"), it works with no problem! What am I missing? Any help is appreciated! Mike Not sure if this is a CSS or Javascript fix I need. I think it will be a javascript issue/solution. Browser=Firefox 6.0.2 website page: [suspicious link removed] I am attempting to use CSS for Alert Box background. I created a class: Code: <style type="text/css"> .alert { background-color:#5f9ebe; } </style> But I have tried so many ways to use .alert and none of them work. Code: function btn1(x) { if (x.anyText.value == "") alert("Type Something") else alert("You typed: " + x.anyText.value) x.anyText.value = "" } Perhaps my question really is: How do I make class="alert" change Alert Box Background. I am very new to Javascript but learning everyday. I would prefer code help not be jquery. Thanks so much. codeFLY I'm taking a JavaScript class in school and we are working with forms and summary pages. We were never taught how to change the font color and bgColor when we go to the summary page after an onSubmit. Can anyone fill me in on how it is done?
I'm having a problem with one of my Labs and My TA is not answering emails. I need to make a button, that when you click it, turns the bgColor blue, when you click it twice, it turns bgColor yellow, and a third time turns it orange. The tricky part is, I need to use an internal CSS style sheet for the color, and a function for the javascript. Here is what I have so far, but I'm completely stuck. Code: <html> <head> <style type="text/css" media="all"> highlight {background-color:yellow;} </style> <script type="text/javascript"> function blue() { document.bgcolor = blue; } </script> </head> <body> <p>Good morning. In less than an hour, aircraft from here will join others from around the world..... </p> <input type="button" value="Push me to change color!" onclick="document.bgColor= 'blue'"> </body> </html> (I cut out the doctype for readability) Obviously I'm not utilizing the function.. I tried replacing 'blue' with blue() (which is the name of the function) but that didn't work.. So how I utilize both the function, and the CSS sheet, AND get the button to do consecutive actions onClick..? -Thanks, this is my first post, I hope everything is understandable. Hi, Is there any way (any api) to display the confirm dialog box with yes/no buttons instead of ok/cancel in javascript. Can any one please let me know. Thanks in advance. Hey Scripters, I need to complete a task for a friend and I am stuck at this part. I am new with Javascript but I'm his only friend that knows a bit of Javascript. So for this problematic part of my task, I need to use tables and dialog boxes. First of all I need to define an array of 3 elements. Each element is associated with a different first name. Then I shall realize a first function to add a name in the table. The function takes as parameter the table previously created and return it containing an additional element whose value is the name that the visitor wants to add. I must use the dialog box prompt so that the user can specify the name he wishes to add in the table. I shall also perform a second function which will display the name that is included in the different array elements. This function will also take the table in parameters and proceed with setting the display name with a dialog box alert type that contains all of the name separated by ";". Help is very much appreciated. Please don't post links, I need explanations, so that I can understand next time I encounter this situation. I have created a button with a window.confirm() method but when I click on it in firefox the dialog box does not appear. It does however appear in all the other browsers
I have a ZIP file in the server. I want create a create a save dialog to save the zip file in local machine. The below code works perfectly fine for firefox but not on IE. apparently I want the code to work in IE. this is 4th JS forum I am posting my question......any help is greatly appreciated. <html> <head></head> <script language='javascript'> function JBTRunZip( ){ location.href="IMAN_IMAGE_FILES.zip"; } function download(locate){ window.open(locate) } </script> <body> <button onclick="JBTRunZip()">generateZip</Button> <td><input type ="Button" value ="Scarica" onclick="download('Test.zip');"></td> </body> </html> Hello, I have some code to open 1 dialog box. Could someone please help me manipulate this code to open multiple boxes with different contents. I would like to do this with out duplicating the existing code, maybe setting a variable. The least amount of code the better. Thanks in advance. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta charset="utf-8"> <title></title> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"></script> </head><body> <div id="dialog" title="Example dialog"> <p>Some text that you want to display to the user.</p> </div> <script type="text/javascript"> $(document).ready(function() { $("#dialog").dialog({ bgiframe: true, autoOpen: false, height: 100, modal: true }); }); </script> <a href="#" onclick="jQuery('#dialog').dialog('open'); return false">Click here to see the popup</a> </body> </html> Hey guys, I've been experimenting around with a way to get a "Save As" dialog to pop up prompting the user to download a certain file from the server. How I've done this so far is open a window in Javascript to a PHP file, server side, passing an argument through _GET. The PHP generates the file and then sends a header request to download. Simple enough. The problem is that using this method opens a blank window in addition to the Save As Dialog. Is there anyway to fool the browser/ hide the window/ etc, so two windows don't pop up at the same time everytime my users press the download button? I am also pretty familiar with AJAX techniques, so if anyone has a solution along that route as well I'd appreciate it. Cheers, Q |