JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Nov 5, 2013 17:08
Oct 7, 2013 14:17
@CapricaSix ok
Sep 11, 2012 06:22
like this
Sep 11, 2012 06:22
/*<script type="text/javascript" src="view.js?issue=may 2011" id="issue-script"></script>*/
function getParameter(url,param) {
    var val = url;
    var url = val.substr(val.indexOf(param));
    var n = url.replace(param + "=", "");
    return n;
}

var script  = document.getElement("issue-script");
getParameter(script.src, "issue");
Sep 11, 2012 05:46
or dropbox file. must store something.
Sep 11, 2012 05:45
you must use something like database,such as facebook status.
Sep 11, 2012 05:42
no way
Sep 11, 2012 05:42
i think the key point is they can't contact each other
Sep 11, 2012 05:41
@user1656125 almost
Sep 11, 2012 05:40
@user1656125 allmost no way
Sep 9, 2012 12:03
@Cdeez let me see,you could insert a debgger; statement in the first pos of droute func
Sep 9, 2012 10:45
@Cdeez you could try to let the function do nothing
Sep 9, 2012 10:44
@Cdeez yes
Sep 9, 2012 10:28
this server code shold be in the onpageload func
Sep 9, 2012 10:28
`{
using (con = new MySqlConnection("server=localhost; uid=root;password=as64ws;database=Gmaps"))
da = new MySqlDataAdapter("select * from routes where uid='" + Session["uname"].ToString() + "'", con);
da.Fill(ds, "mroute");
foreach (DataRow r in ds.Tables[0].Rows)
{
uroute.Add(r["latlng"].ToString());
}
croute = new string[uroute.Count];
croute = uroute.ToArray();
hdncroute.Value = string.Join("&", croute);
}`
Sep 9, 2012 10:26
@Cdeez the life cicle is .net(server) onPageLoad -> client(browser) onClick on button -> .net(server) Button1_Click
Sep 9, 2012 10:24
@C
Sep 9, 2012 10:23
@Cdeez as i say, droute func going wrong is why the page reload
Sep 9, 2012 10:20
@Cdeez as i say, droute func going wrong is why the page reload
Sep 9, 2012 10:08
@Cdeez my answer would be work
Sep 9, 2012 10:07
@Cdee
May 20, 2012 07:18
none here,but me.
Apr 18, 2012 07:43
@patrick set width and height directly using $.css
Apr 18, 2012 06:10
hello
Apr 9, 2012 14:11
hello
Apr 8, 2012 09:34
i think yield is more flexible and more power
Feb 26, 2012 11:07
have long time be from here.
Feb 26, 2012 11:07
hello,all guys.
Jan 1, 2012 00:34
Happy new year.
Dec 27, 2011 02:28
:2209629 not the file local "global" object.
var setName;
var that=this;
setName = function (name) {
    that==this; //false
    return this.name = name;
};
setName("LuLu");
Dec 27, 2011 02:25
@Zirak so this is answer.
Dec 27, 2011 02:24
for instance
var setName;
setName = function (name) {
return this.name = name;
};
setName("LuLu");

when `setName("LuLU")` called, what is `this` refer to,a new excute context but not the top-level module scope?
Dec 27, 2011 02:20
@Zirak but when i excute console.log(this) in Node's top-level module scope, i get {}. what is this?
Dec 27, 2011 02:19
@Zirak yeah
Dec 27, 2011 02:18
@Zirak oh, i know scope in js too. but i can't explian why output is undefined with js knowledge.
Dec 27, 2011 02:16
@Zirak i want to know the excute process
Dec 27, 2011 02:15
@Zirak ok
Dec 27, 2011 02:15
@Zirak detail please
Dec 27, 2011 02:14
@Purmou if you give a more right answer i would accept your answer
Dec 27, 2011 02:12
@Zirak i accepted the answer because i thank he for long explian. but the answer does.t get the point.
Dec 27, 2011 02:07
Dec 18, 2011 01:04
@Purmou jsfiddle.net/bp3Ew please read it.
Dec 18, 2011 01:02
@Purmou $card is not the CARD you want
Dec 18, 2011 01:00
@Purmou no, $card now is anything else.
Dec 18, 2011 00:58
@Purmou it work, but not in the way what you want it for.
Dec 18, 2011 00:57
@Purmou no
Dec 18, 2011 00:54
@Raynos hehe
Dec 18, 2011 00:53
@Raynos hehe
 

Node.js

Because you rock when you don't block
Dec 27, 2011 02:50
would someone give me a help?stackoverflow.com/questions/8624913/…