|
Just letting you know what your errors here are. See my other post for new code.
do(q)
can't use expressions at the top of do loop *(q)*, just use
do {
z is not declared with var *and* initialised with a value. var z = 0;
z +=1;
you don't need the { } braces for a single statement..
if(q==q) return q;
but, q==q just evaluates to true so you might as well have just written this
return q;
I am not able to reply very quickly. On a training course for another 10 days. Be patient.
Please keep trying to write new code as it is easier for me to guess what you are doing.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
modified 25-Mar-13 18:05pm.
|
|
|
|
|
Finally, ask you for anything more in a array of 12 elemented to 49 membered Argument want to match, you can also help me in this topic? JavaScript writing is so hard really. Thank you for your help.
I tried the following lines:
var arrNumbers = [49];
var arrOutside = [];
var arrInside = ["19","20","21","40","41","45","12","23","34","36","37","46"];
var z=0;
for(var i=0; i<12; i++) { arrInside[i]=false; }
for(var j=49; j>0; --j)
{
arrNumbers[j]=j;
if(arrNumbers[j] != arrInside[i]) {
document.write(arrNumbers[j]=arrOutside[z], + ", ");
arrInside[i] = true;
z++;
}
}
if this is what special things I did not want to deal with it..
I do not want to discuss whom it is could not be shy
|
|
|
|
|
Please explain what inside & outside mean.
inside what?
outside what?
arrNumbers = [49]; // array length = 1 ???
I'm guessing this is what you intended
arrNumbers = new Array(49);
Also, you can't assign (=) inside of document.write()
arrOutside[j]=j
arrNumbers[j] = arrOutside[z]
did you mean to show arrNumbers and arrOutside, or copy from one to another?
this does not make sense.
arrNumbers[j] && arrInside[i] = true;
What other programming language do you know?
Because, it might be easier if you write your code in a computer language that you are familiar with.
I will be able to figure it out.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
It flags to the 49 numbers of numeric lotto arrInside is the numbers two week of and arrOutside is other numbers of 49 that is The number 49 is the number of remaining ..previously worked on the platform of Visual C++ 6.0.. I am thinking you are right JavaScript language is not completely literal a language because of it's called name as script ...
arrInside arrOutside are instead of lucky or unlucky they may also like the your previous thread is to be
modified 28-Mar-13 3:23am.
|
|
|
|
|
Hi All,
I am not able to read xml from HTTPS(Secure) server to HTTP server using JavaScript. it is working perfectly if XML is available on same server but not from other server. Frown |
It seems Crossdomain issue.
Could anyone please help me out what technology need to use.
I heard with the help of JSONP but don't have much idea about it.
Please help me on it.
Thanks in Advanced.
Regards,
Satyam
|
|
|
|
|
[sniff, sniff] It smells like double-posting sock puppets in here...
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
They were difficult to catch, weren't they ?
|
|
|
|
|
Oooohh... I smell more sock puppets...
|
|
|
|
|
Hi All,
I am not able to read xml from HTTPS(Secure) server to HTTP server using JavaScript. it is working perfectly if XML is available on same server but not from other server.
It seems Crossdomain issue.
Could anyone please help me out what technology need to use.
I heard with the help of JSONP but don't have much idea about it.
Please help me on it.
Thanks in Advanced.
Regards,
Satyam
|
|
|
|
|
Oooohh... I smell a sock puppet...
|
|
|
|
|
That sounds more like a certificate/trust issue. It needs to be exported to the other machine (the one using HTTPS)
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
Good day
I have this web page to create which has three columns ,in the left and the right columns I created two selection lists.Now i have to write a script that moves the selection list items between the two columns.please some body help me out.
|
|
|
|
|
You would have to make the columns as containers, like div tags and give them id values,
And then use JQuery, to empty the values in one container, and copy the values from the first container to the 2nd container.
Something like this, off the top of my head and not tested, just an example to give you and idea how.
$(#container2).empty();
var htmlMarkup = $(#container1).html();
$(#container2).html(htmlMarkup);
[edit]
it might be on the last line
$(#container2).append(htmlMarkup);
modified 18-Mar-13 14:34pm.
|
|
|
|
|
Use jQuery Sortable
$( "#sortable1, #sortable2" ).sortable({
connectWith: ".connectedSortable";
}).disableSelection();
Just make sure to give your "columns" the class "connectedSortable".
for reference:
http://jqueryui.com/sortable/#connect-lists[^]
Sorry, my english is bad!
|
|
|
|
|
how can i do i have oracle xe as database, all codes regarding database insert, search etc are working correctly , can any one give me some idea how to overcome this ?
|
|
|
|
|
The problem you'll have is what to do if they cancel. If you get the next unique number and then someone else visits the page and you get the next unique number but then the first person cancels, you'll have a gap in numbers. If that's fine, then all you have to do is get the MAX(column) value and add 1. Otherwise, don't show the unique number until after the record is created.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
this is a jquery question, I am not sure if this is a correct forum to post it though.
There is a DIV tag with many elements inside. the div tag has a class to add jquery function to manage mouseover, mouseleave and click event to redirect to another page. everything works great till now. The problem is, now I have to add a button inside the div which should have its own function different from the div click.
I would appreciate if anybody can help me.
please note that I can't use the elements id, since the div is inside a repeater.
here are my Jquery code:
$('.Status').click(function() {
$(this).attr('data-redirect', '1');
});
$('.Highlight').click(function() {
var type = $(this).attr('data-DailyViewType');
var typeid = $(this).attr('data-editurl');
var btn_status = $(this).find('data-redirect');
if ($(this).hasClass('Status')) {
alert(1);
}
if (type != undefined || type != null) {
window.location = 'RuleEdit.aspx?DailyRuleTypeID=' + type;
}
else {
if (typeid != undefined || typeid != null) {
if (typeid > 0 && btn_status != 1) {
window.location = 'RuleEdit.aspx?id=' + typeid;
}
else {
}
}
}
});
$('.Highlight').mouseover(function() {
$(this).css('border-left-color', '#FF9900');
$(this).css('background-color', '#FAFAFA');
});
$('.Highlight').mouseleave(function() {
$(this).css('border-left-color', 'White');
$(this).css('background-color', 'White');
});
<asp:Repeater ID="RptRulesAndAlerts" runat="server"
onitemdatabound="RptRulesAndAlerts_ItemDataBound" >
<ItemTemplate>
<div class="tabs-content Highlight " align="center" data-editurl='<%# DataBinder.Eval(Container.DataItem, "RuleAlertID") %>'>
<asp:Panel ID="RuleAlert" runat="server">
<table cellpadding="7" cellspacing="7" style="border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #CDCDCD ; font-size: 11px; ">
<tr valign="middle">
<td><asp:Panel ID="Highlighter" runat="server"></asp:Panel> </td>
<td width="12%" >
<div class=" notification-type" style="font-weight: bold; word-spacing: 90px; font-size: 12px;" align="center" >
<%# GetLocalResourceObject(DataBinder.Eval(Container.DataItem, "Type").ToString()) %>
</div>
</td>
<td width="40%">
<div id="div_AlarmRuleTitle" style="font-weight: bold; font-size: 12px; color: #222; line-height: 24px;" align="left">
<img src='<%# Page.ResolveClientUrl(DataBinder.Eval(Container.DataItem, "ImgUrl").ToString()) %>' id="ImgAlarm" alt="" />
<label id="lbl_title" > <%# DataBinder.Eval(Container.DataItem, "Name") %> </label>
</div>
<br />
<div id="div_AlarmRuleDesc" style="font-size: 11px; line-height: 16px; color: #777" align="left">
<asp:Label ID="lbl_desc" runat="server" ></asp:Label>
<br />
<%# GetLocalResourceObject(DataBinder.Eval(Container.DataItem, "EventDescription").ToString()) %>
<br />
<asp:Label runat="server" ID="lbl_recipient" ></asp:Label>
</div>
</td>
<td width="14%" style="font-size: 11px"> <%# DataBinder.Eval(Container.DataItem, "Time")%>
</td>
<td width="15%" >
<%# GetLocalResourceObject(DataBinder.Eval(Container.DataItem, "UploadMethod").ToString())%>
</td>
<td width="20%" align="center" valign="middle">
<asp:Panel ID="pnl_status" runat="server" Class="Status" data-redirect="0">
<%--<div class=" switch switch-warning toggle " id="toggleOnOff" runat="server" data-toggle="switch" data-checkbox="chkOnOffToggle" ></div>--%>
<%--<asp:LinkButton ID="toggleOnOff" runat="server" OnClick="Toggle" CssClass=" switch switch-warning toggle " data-toggle="switch" data-checkbox="chkOnOffToggle"></asp:LinkButton>---%>
</asp:Panel>
</td>
<td width="">
<asp:Panel ID="pnl_button" runat="server" >
</asp:Panel>
</td>
</tr>
</table>
</asp:Panel>
</div>
</ItemTemplate>
</asp:Repeater>
|
|
|
|
|
Yes, you can give your div an ID if that makes this easier. Just put a runat="server" tag on it and give it an ID and then you can access via ID.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Try this
$('button').click(function(e){
e.stopPropagation();
})
if what you need on mouseover/mouseleave is just change css, do it using css
.highlight{
border-left: #FFF;
background-color:#FFF;
}
.highlight:hover {
border-left: #FF9900;
background-color:#FAFAFA;
}
Sorry, my english is bad!
|
|
|
|
|
when you trigger the button,you should cancel bubble.
|
|
|
|
|
Is it possible to read a text file in javascript? Sample code pls..
|
|
|
|
|
Hakan Bulut wrote: Sample code pls.. Please try to do your own research first. You can use Google, or go here[^] for help on Javascript.
Use the best guess
|
|
|
|
|
|
No. not generally easy from within a web browser. It's a security risk.
But you can disguise file as .js and load it with the script tag.
<script language="javascript" src="file.js"></script>
The file *must* contain valid script code. But you can put your data in string form, assigned to a variable.
Note: the external file must not contain any script tags.
direct loading of any file type is possible when using the following..
Web servers
node.js
spidermonkey shell
rhino shell
Windows Script Host (cscript)
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
It is good idea. I have to try it
|
|
|
|