|
Your Error Fire At Return $("#"+id).val()
javascript Can't get this Type Of Value
So I Have Use
var Id1 ="#"+id //Append Value
And Return $(id1).val() //Get Value Of It
|
|
|
|
|
I am using the bgiframe.js library file in my project for a context menu. I know the the $.browser object has been deprecated so I am using the jquery-migrate-1.2.1.js file declared before the bgiframe.js file as shown below and am using it in the code below. This said I am still getting the "jQuery error: JavaScript runtime error: Unable to get property 'msie' of undefined or null reference" error in the bgiframe.js file when access to the $browser is called. Can anyone help?
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/superfish.js"></script>
<script type="text/javascript" src="../js/hoverIntent.js"></script>
<script type="text/javascript" src="../js/jquery-migrate-1.2.1.js"></script>
<script type="text/javascript" src="../js/bgIframe.js"></script>
$(document).ready(function(){
$("ul.nav")
.superfish({
animation : { opacity:"show",height:"show"}
})
.find(">li:has(ul)")
.mouseover(function(){
$("ul", this).bgIframe({opacity:false});
})
.find("a")
.focus(function(){
$("ul", $(".nav>li:has(ul)")).bgIframe({opacity:false});
});
});
|
|
|
|
|
The problem was that bgiframe.js was being referenced in multiple places. What I did was add the jquery-migrate-1.2.1.js reference below the jquery.js reference in every place it was referenced. Thanks for everyone's help.
Steve
|
|
|
|
|
I did a slider but does not seem to pop the top menu
|
|
|
|
|
|
How can we help?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi all,
I am trying to make a auto blinking div but while trying to achieve using setTimeout its saying " this.off is not a function" in on method I tried two variations.
Please help !!!
var Light = function(color) {
this.color = color;
};
Light.prototype = {
ref:null,
defColor:'black',
on:function(){
if(this.ref != null){
this.ref.css('background-color',this.color);
window.setTimeout(function(){this.off()}, 5000);
}
},
off:function(){
if(this.ref != null){
this.ref.css('background-color',this.defColor);
window.setTimeout(function(){this.on()}, 5000);
}
}
};
var l1;
$(document).ready(function(){
l1 = new Light('red');
l1.ref=$('#mydiv');
l1.on();
});
akhilonly007@gmail.com
|
|
|
|
|
When the anonymous function you've passed to window.setTimeout is called, this will be pointing to the global scope, rather than the specific object instance that called setTimeout . This is one of the confusing quirks of javascript code.
There are several possible solutions in the answers to this SO question[^]. For example:
- Save the outer
this reference:
var me = this;
window.setTimeout(function(){me.on()}, 5000); - For modern browsers, use the built-in
bind function[^]:
window.setTimeout(this.on.bind(this), 5000); - Use jQuery's
proxy method[^]:
window.setTimeout($.proxy(this.on, this), 5000);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
|
$("#button1").val() + $("#button2").val();
However, what you asked doesn't really make any sense. Button's don't really have values. Perhaps you mean something like a calculator where you have buttons for numbers?
If so, then on each click of a button add to the value in the textbox.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
how to bind data to infragistics webhierarchicaldatagrid through javascript
im having data in datatable i need to bind this dt to webhierarchicaldatagrid
this is the
<ig:webhierarchicaldatagrid id="whdg1" runat="server"
autogeneratecolumns="false" autogeneratebands="false" initialexpanddepth="0" datakeyfields="CenterID"
initialdatabinddepth="0" height="500" width="100%">
<expandcollapseanimation slideopendirection="Auto" slideopenduration="300" slideclosedirection="Auto"
slidecloseduration="300">
<clientevents populated="" populating="">
<columns>
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="Term" key="Term" header-text="Term">
<ig:bounddatafield datafieldname="" key="" header-text="">
<bands>
<ig:band key="" autogeneratecolumns="false" datakeyfields="">
<columns>
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<ig:bounddatafield datafieldname="" key="" header-text="">
<behaviors>
<ig:activation activecolumncssclass="igg_ActiveColumn" activerowcssclass="igg_ActiveRow"
activecellcssclass="igg_ActiveCell" enabled="true">
|
|
|
|
|
Have you asked Infragistics?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi,
I am using dynamic datetimepicker that the user can add to any number. But I am having postback problem. Once I submit it, the return page should have all the submitted values including those added dynamic datetimepicker. Right now when i submit and when the page returns, all other static controls with data are there but no dynamically added datetimepicker controls.
Below is the code I used to add datatimepicker dynamically using javascript:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<link rel="stylesheet" media="all" type="text/css" href="jquery-ui.css" />
<link rel="stylesheet" media="all" type="text/css" href="jquery-ui-timepicker-addon.css" />
<script type="text/javascript" src="jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="jquery-ui-sliderAccess.js"></script>
<script type="text/javascript">
$(function () {
var counter = 1;
jQuery("#<%= btnD1Add.ClientID %>").click(function (event) {
event.preventDefault();
jQuery("<li>").appendTo(".Date1More");
jQuery("<label id='lblD1StartTime" + counter + "'>StartTime:</label><input type='text' id='txtD1StartTime" +counter + "' name='txtStartTime1'/>").timepicker({
hourGrid: 10,
minuteGrid: 10,
timeFormat: 'hh:mm tt'
}).appendTo(".Date1More");
counter++;
});
});
</script>
<asp:Button ID="btnD1Add" runat="server" Text="Add more time slots" />
<li>
<ul class="Date1More">
</ul>
</li>
</html>
Now how to use postback for these controls? I had tried to use following code in code but didn't work. I even tried it using !Ispostback() function under pageLoad but no effect.
protected string[] txtStartTime1;
protected void Page_Load(object sender, EventArgs e)
{
txtStartTime1 = Request.Form.GetValues("txtStartTime1");
}
protected void Page_Init(object sender, EventArgs e)
{
try
{
if (txtStartTime1.Length > 0)
{
TextBox txtStTime1 = new TextBox();
txtStTime1.ID = "txtD1StartTime";
txtStTime1.CssClass = "timepicker";
this.Controls.Add(txtStTime1);
}
}
catch(Exception ex){}
}
Is there any another way to do it?
Please help..
Dhyanga
|
|
|
|
|
To understand this behaviour you need to understand page life-cycle properly. I can't explain the whole stuffs here but would recommend you to read it.
Dhyanga wrote: Is there any another way to do it?
Yes, you can very well avoid postback by using ajax or PageMethods. Just see which is best suited in your scenario.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
Thank you very much Anurag. I don't know why I didn't think of using Ajax before I spent lots of time thinking on this.
Dhyanga
modified 5-Dec-14 11:17am.
|
|
|
|
|
You are welcome.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
I hope this is the most appropriate forum...
To people (perhaps) with experience doing things like this - does this even sound possible?
I'm having to do a bit of translation work, and I'm using Google Translate a lot (in Chrome). It would be really handy to be able to have four translation boxes on one page (e.g., English to Spanish at the top, and below that, Spanish to English), with buttons to transfer the text back and forth. That would make it far easier to check the back translation.
Might I be able to do such a thing with a user script? And can anyone point me at the best resources for developing these in Chrome? Cheers!
|
|
|
|
|
I saw a similar thing done believe it or not, in Google 'spreadsheet', so that each of two parties could see their native language being typed and the translation to their colleagues' language in another cell - since the sheet was shared the two parties could see everything
I have no doubt you could use a web form and the Google Translation API and javascript - I don't know what you mean 'in Chrome' - have a look here http://davidwalsh.name/demo/google-language-api.php[^] from this code http://davidwalsh.name/google-translate-api[^] - I just did a quick search 'javascript google translate' to find that - you may want to include 'REST' if you do a search, to use the newer Google Translate REST API
|
|
|
|
|
Thanks, by 'in Chrome' I simply meant that I use Chrome, so I'd want a user script that would work in Chrome. Reading around these are now natively support so I should be good...
|
|
|
|
|
विजिवट स्टुडियो में ग्राइडलाईन का उपयगोग कैसे करते है ।
|
|
|
|
|
I tried with Bing translator and this looks like Hindi language. Therefore I suggest you to bring the topic here[^] where it is most probable you will find someone understanding your lauguage. Either way you could write in English if you feel confident enough and we can try to help you.
|
|
|
|
|
Hi,
Get back to code project after long time....
I am using DataTable.js plugin for showing Grid to my salesforce application.
Every thing works fine except pagesize box and search box.
This works fine in IE and Chrome, but in Mozilla Search box and Page size box are overwriting in Grid, they are supposed to appear above the grid, but coming (overlapping) with Grid,
Please let me know if you have any solution for this.
Thanks,
Hemant
By:
Hemant Thaker
|
|
|
|
|
HTML PAGE:
<form id="detailsform">
<label for="cust_name">Name</label>
<input id="cust_name" type="text"/>
<label for="cust_id">Customer-ID</label>
<input id="cust_id" type="text" />
<label for="cust_phone">Phone Number</label>
<input id="cust_phone" type="number" />
<label for="cust_add">Address</label>
<input id="cust_add" type="text" />
<label for="cust_issue">Issue</label>
<input id="cust_issue" type="text" />
<label for="complaint_date">Date of Complaint</label>
<input id="complaint_date" type="text" />
<!--
<table align="center" width="100%">
<tr>
<td align="left" width="35%"><a href="#historypage" style="text- decoration:none">
<input type="button" value="Show History" data-icon="back" data-iconpos="right" id="History" onClick()="getHistory()"/>
</a></td>
<td align="right" width="35%"><a href="#assessmentpage" style="text-decoration:none">
<input type="button" value="Start Assessment" data-icon="check" data-iconpos="right" id="Assessment"/>
</a></td>
</tr>
</table>
</form>
<div data-role="page" id="historypage" data-theme="f">
<div data-role="content">
<form id="historyForm">
<label for="hist_cname">Customer Name</label>
input id="hist_cname" type="text" />
<label for="hist_cid">CustomerID</label>
<input id="hist_cid" type="text" />
</form>
<div id="emp_tb1" align="center" data-theme="b">Here are the details </div>
</div>
Script page:
function getHistory() {
var cust_id = document.getElementById("cust_id");
var myTable = '';
myTable += '<table id="myTable" cellspacing=0 cellpadding=2 border=1>';
myTable += "<tr><td>S.No.</td><td>Date</td><td>Time</td><td>Complaint(s)</td></tr>";
var url = "http://localhost:8080/POS/rest/WebServices/getHistory/"+cust_id.value;
$.getJSON(url, function(json) {
$.each(json, function(i, v) {
myTable += "<tr><td>" + v.date + "</td><td>"+ v.time + "</td><td>" + v.issue
+ "</td><td>" ;
});
});
what i have to do here is,when i clicked the button the function is called and the corresponding result is stored in mytable variable and the result varailbe has to be displayed in history page. here how to navigate from detailsform to historypage while calling the function???
Can anyone help me out to do this?
Thankyou
|
|
|
|
|
Hi all Smile |
I have a problem to formatted an int to the special format
example :
var exp_int = 5640100;
a need writes the integer to 5 640 100
|
|
|
|