|
Either that or I can find my way to http://translate.google.com/[^]. The only Latin I know is "Romani ite domum".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You mean you didn't translate Homer's words from the Attic Greek?
Veni, vidi, abiit domum
|
|
|
|
|
It's a different Homer[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I use Dreamweaver to generate the rollover Javascript code to something like this:
<a href="http://url_string_here" target="_blank"
//onmouseover="MM_swapImage('Image7','','http://rolloverimage_URL/file_ro_07.jpg',1)"
// onmouseout="MM_swapImgRestore()">
The problem is the last part of the link is dynamic. so I tried to include the javascript for rollover and rollout within document.write.
document.write("<a href='http://astringforURL=" + theCourseCode + "' target='_blank'");
document.write("onmouseover='MM_swapImage('Image7','','http://rolloverimage_URL/file_ro_07.jpg',1)'");
document.write(" onmouseout='MM_swapImgRestore()'>");
IT does the link OK not the rollover anymore with this. I think it may relate to the single quotes it had initially and I had to change the double quotes into single quotes while retaining the single quote. I can't put the script to do rollover outside either.
How can I make it work?
Thanks,
|
|
|
|
|
Don't use doument.write()
During parsing parts of document (e.g. HEAD-part before body) browser finds
script inside of BODY (browser parses body part). In this case the
body object is real exist.
document.write in use of Internet Explorer may create an NEW BODY and new document.
To append objects inside actual document - actual body - please use
Javascript functions createElement() and appendElement().
var X01=document.createElement("IMG");
if(X01!=null)
{var X02=document.body.appendChild(X01);
if (X02!=null)
{
// X02 is pointer of created object inside body
}
}
|
|
|
|
|
My aspx page contains following code
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" language="javascript">
function fnClickCalc() {
document.getElementById('<%= btnCalc.ClientID %>').click();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<table>
<tr>
<td> </td>
</tr>
<tr>
<td><asp:Label ID="lblFirstNo" runat="server"></asp:Label></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><asp:Label ID="lblsecondNo" runat="server"></asp:Label></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><asp:Label ID="lblResult" runat="server"></asp:Label></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><asp:Button ID="btnCalc" Text="Calculate" runat="server"
onclick="btnCalc_Click" /></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><asp:Button ID="Button1" Text="Mirror Calculate" runat="server"
OnClientClick="fnClickCalc();" /></td>
</tr>
</table>
</form>
</body>
</html>
My code behind file is,
protected void btnCalc_Click(object sender, EventArgs e)
{
lblResult.Text = lblFirstNo.Text + lblsecondNo.Text;
}
When i click "Button1" button it fires btnCalc_Click event but i am not getting "55" result since page load again fires after "btnCalc_Click" event.
However if i click "btnCalc", it shows me desired output.
Any suggestions..
|
|
|
|
|
Try:
OnClientClick="fnClickCalc();return false;"
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks..It works..It was so simple. Really appreciate your answer
|
|
|
|
|
Include jquery library from Jquery.com in header section.
Change YOur Function to this ..
<script type="text/javascript" language="javascript">
function fnClickCalc() {
var lbl1 = $("#lblFirstNo");
var lbl2 = $("#lblsecondNo");
var lbl3 = $("#lblResult");
lbl3.Text = lbl1.Text + lbl2.Text ;
}
</script>
|
|
|
|
|
do not use easyui-pagination,use jquery to made own page controls than made it can controls easyui-datagrid
|
|
|
|
|
This is not clear. What?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Either he is campaigning against jQuery EasyUI (http://www.jeasyui.com/[^]) or he is passing a peer-to-peer message to some one else through the forum.
|
|
|
|
|
hi
i want to drag a picture and it stick to positions with jquery
background picture is like a line with three circle at start middle and end.
**small picture must stop only on the backgroung picture circules.
**small picture can be draged with mouse to the positions.
thanks
|
|
|
|
|
I am not sure exactly what do you want, but assuming that you want to drag and drop page elements using jQuery. I have created a small fiddle to demonstrate how something like this can be done here.
|
|
|
|
|
how do i create an exception and catch it with the sql query in java? please give some sample programs..
thank u
|
|
|
|
|
You probably will not get an answer to your question in this forum since it is a JavaScript forum.
I was going to suggest you post this as a Quick Answer question, but I see that you have already done so. The best thing to do at this point is to look into the solution provided to that post and not keep posting your question in other forums as it will not be well received.
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
|
this is in C#
string q = " {label:\"January\",value:\"1\" } , {label:\"Feburary\",value:\"2\"}";
i want to convert this into an array in javascript
function(data){
this is where i need array data is nothing but string q
}
Please help urgent
Chandra Sekhar
|
|
|
|
|
IE String Object (literal) (JScript)
Allows manipulation and formatting of text strings and determination and location of substrings within strings.
String is not a collection and not array. Use operator + or method concat.
To convert a JScript-string into array use method split.
To convert a numeric value into String use method parseInt.
Syntax
newString = new String(["stringLiteral"])
Arguments
newString
Required. The variable name to which the String object is assigned.
stringLiteral
Optional. Any group of Unicode characters.
Remarks
String objects can be created implicitly using string literals. String objects created in this fashion
(referred to as standard strings) are treated differently than String objects created using the new operator.
All string literals share a common, global string object. If a property is added to a string literal, it
is available to all standard string objects:
var alpha, beta;
alpha = "This is a string";
beta = "This is also a string";
alpha.test = 10;
In the previous example, test is now defined for beta and all future string literals. In the following example,
however, added properties are treated differently:
var gamma, delta;
gamma = new String("This is a string");
delta = new String("This is also a string");
gamma.test = 10;
In this case, test is not defined for delta. Each String object declared as a new String object has its own set of members.
This is the only case where String objects and string literals are handled differently.
Properties
constructor
length
prototype
Methods
anchor
big
blink
bold
charAt
charCodeAt
concat
fixed
fontcolor
fontsize
fromCharCode
indexOf
italics
lastIndexOf
link
match
replace
search
slice
small
split
strike
sub
substr
substring
sup
toLowerCase
toUpperCase
toString
valueOf
Examples
// A primitive string.
var string1 = "Hello";
// Two distinct String objects with the same value.
var StringObject1 = new String(string1);
var StringObject2 = new String(string1);
// An object converts to a primitive when
// comparing an object and a primitive.
print(string1 == StringObject1); // Prints true.
// Two distinct objects compare as different.
print(StringObject1 == StringObject2); // Prints false.
// Use the toString() or valueOf() methods to compare object values.
print(StringObject1.valueOf() == StringObject2); // Prints true.
length Property (String)
Returns the length of a String object.
strVariable.length
"String Literal".length
The length property contains an integer that indicates the number of characters in the String object.
The last character in the String object has an index of length - 1.
|
|
|
|
|
I am working with Google Maps embedded on my webpage. What I want is to create a button click event, so that after a user has entered an address into a textbox (called txtBoxMaps), they can click a button which will display the new location on the same webpage. I tried using: google.maps.event.addListener(map, 'click', function(event) but when I click the button (btnDisplay) nothing happens. I can see the google map but it doesnt change after the "Display" button is clicked.
Here is my code below:
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<style type="text/css">
.style1
{
width: 104px;
}
.style2
{
width: 144px;
}
#GO
{
width: 92px;
}
#Display
{
width: 113px;
}
</style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
<script type="text/javascript">
function Initialize() {
var mapOptions = {
center: new google.maps.LatLng(-33.01, 27.9),
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('GMap1'), mapOptions);
google.maps.event.addListener(map, 'click', function(event) {
mapZoom = map.getZoom();
startLocation = event.latLng;
var input = document.getElementById('TextBox1');
});
}
google.maps.event.addDomListener(window, 'load', Initialize);
</script>
<input type="text" id="TextBox1"/>
<input type = "button" id="btnDisplay" value = "Display"/>
<div id="GMap1" style="height: 240px; width:570px" ></div>
|
|
|
|
|
You have to divide the functions in 2 or 3 parts
Initilize, drawMap
And then call drawMap on the button click
function intialize() {
drawMap();
}
function drawMap() {
var mapOptions = {
center: new google.maps.LatLng(-33.01, 27.9),
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('GMap1'), mapOptions);
google.maps.event.addListener(map, 'click', function(event) {
mapZoom = map.getZoom();
startLocation = event.latLng;
var input = document.getElementById('TextBox1');
});
}
|
|
|
|
|
hi, i am trying to build dynamic list for my jquery mobile app. but i get an syntax error... can any one check this code out pls. ty
function appointmentList(url, title, row1, row2, row3, tlf, task, done, datetime, endDate) {
/*var error_str = "Undefined";
if (title == undefined || title == "") { title = error_str; }
if (row1 == undefined || row1 == "") { row1 = error_str; }
if (row2 == undefined || row2 == "") { row2 = error_str; }
if (row3 == undefined || row3 == "") { row3 = error_str; }
if (datetime == undefined || datetime == "") { datetime = error_str; }
if (tlf == undefined || tlf == "") { tlf = error_str; } */
String statusStr = "";
if(done == "3") {
statusStr = "<b style='color:#009933;'>Utført</b></span></li>";
}
else if(done == "2"){
statusStr = "<b style='color:#FFCC00;'>Pågår</b></span></li>";
}
else if(done == "1") {
statusStr = "<b style='color:#FF0000;'>Ikke utført</b></span></li>";
}
else {
statusStr = "</span></li>";
}
var buildList += "<li data-role='list-divider'>" + title + "<span class='ui-li-count'>" + formatDateTime(datetime) + plainToHtml(' - ') +formatDateTime(endDate) + plainToHtml(statusStr);
buildList += "<li>";
buildList += "<div class='ui-grid-a'>";
buildList += "<div class='ui-block-a'>";
buildList += "<h4>" + plainToHtml(row1) + "</h4>";
buildList += "<h4>" + plainToHtml(row2) + "</h4>";
buildList += "<h4>" + plainToHtml(row3) + "</h4>";
buildList += "<b>Tele:" + "<a href='tel:" + tlf + "'>"+ String(tlf) + "</a></b>";
buildlist += "</div>";
buildlist += "<div class='ui-block-b'>";
buildlist += "<div class='appIcons' style='float:left;'>";
buildlist += "<a href='#nysak' data-transition='slide'><img src='icons/add-icon.png' style='margin-left:1em;'></a>";
buildlist += "<a href='#siste' data-transition='slide'><img src='icons/saker.png' style='margin-left:1em;'></a>";
buildlist += "<a href='#mote' data-transition='slide'><img src='icons/task.png' style='margin-left:1em;'></a>";
buildlist += "</div>";
buildlist += "</div>";
buildlist += "</div>";
buildlist += "</li>";
return buildList;
}
|
|
|
|
|
Member 10220480 wrote: but i get an syntax error It would help if you explained where.
Use the best guess
|
|
|
|
|
Member 10220480 wrote: }
Check your brackets. Some of them are backwards.
|
|
|
|
|
mmm... to many days coding, cant find it m8. can you pls tell me whare?
|
|
|
|