|
function note(x,y,who)
{
this.x = x
this.y = y
this.who = who
this.timeout = null
}
note.prototype.show()
{
$('#notex').fadeIn(200, function() { alert(this.x); }
this.timeout = SetTimtout( function() { alert(this.who); } );
}
var sa = new note(50,50,'notex')
sa.show();
I am trying to create a simple class in which i want to sent the id of a div to fade in and fade out...
so that i can dynamically change its color width and height with a basic class.
I read about closures but inside jquery this is referring the div notex....
how to access parent functions variables?
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
hi all.
how i make a simple gif picture to be as the same size of the cell that content it?
im trying html on visual studio.
Thanks.
|
|
|
|
|
I am not sure about your question, but what I understand,,
You can set height and width of image control as same as cell that content it.
|
|
|
|
|
thanks a lot for answer.
i did this. i make the height and width of the image control as same as the cell that content it, but dont stay like that when i run the web site, the size is different and the picture moved from the center of the cell.
what that can be?
|
|
|
|
|
Can you post the html code around your image control (i.e. the table section) and the size of the image you're putting in? (Please remember to use the "pre" tags when doing so).
|
|
|
|
|
Let's say there is a client app installed on a computer. I want to send notification to the client app from the web server. I know I can do this with a client and server app by opening a tcp connection. Can a non-http tcp connection be opened between the client app and the http server? Do I need to run a client app on the web server? Will running such an app, like an .exe file, cause performed problems for a standard http web server? Would I need a dedicated server?
Initiating periodic http requests from client app would not be fast enough for my requirements.
|
|
|
|
|
As has been pointed out before, this is the wrong way to do it. Standard network communication should always be initiated from the client, with the server always listening for connection requests. If you try to initiate communication from the server what happens if the client is not listening?
dene99970 wrote: Initiating periodic http requests from client app would not be fast enough for my requirements.
What evidence do you have for this statement?
It's time for a new signature.
|
|
|
|
|
I guess what I mean to say is that once connection is initiated by client, how can I have fast real-time communcation between client and web server. Can that be done on one of the many shared hosting solutions that cost $20 a month or so, or do I need a dedicated server with 2 seperate components:
1. the web server
2. the server app programmed in perhaps c++, java, or whatever
|
|
|
|
|
I'm not sure that I could answer this question as so much depends on the location of the server and client, the bandwidth available, line speed, traffic volumes etc. The only way to get a reasonable idea of speed would be to talk to the hosting services to see what facilities they offer.
It's time for a new signature.
|
|
|
|
|
I am just going to get right into it. I have a function that is supposed to reset the to original starting point (one showing and the other 6 hidden), however I can not figure out why the loop keeps breaking.
function resetListGroup(n) {
var content=cs_findContent("cs_"+n);
if (content!=null && content.lists.length>0) {
cs_initListGroup(content,"");
for (var i = 0; i < states.length; i++) {
var layer = states[i];
alert("the number is: " + i + " and layer is: " + layer);
if (d!= states[i]) {
layer.style.display = "none";
}
else {
layer.style.display = "none";
}
}
opening.style.display = "block";
}
}
and the array is:
states=new Array()
states[0]="Mac"
states[1]="XP-32-Printers"
states[2]="Vista-32-Printers"
states[3]="Vista-64-Printers"
states[4]="7-32-Printers"
states[5]="7-64-Printers"
states[6]="opening"
what did I miss?
|
|
|
|
|
I figured it out. For some strange reason the var layer = states[i]; should be
<br />
var layer = document.getElementById(states[i]);
|
|
|
|
|
I know you have answered the question, but I notice this in the code above:
if (d!= states[i]) {
layer.style.display = "none";
}
else {
layer.style.display = "none";
}
Looks to me like that will do the same thing for every value of states[i] it picks up.
|
|
|
|
|
Experts,
I have a website i am currently (trying) to make
I have a piece of code which goes
<body onLoad="disptime()","MM_CheckFlashVersion('7,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?);DisplayDIV('SubKicks');HideDIV('LeftDiv');HideDIV('RightDiv');HideDIV('FrontDiv');HideDIV('SideDiv');">
Which doesn't seem to do what it is suppossed to do.
disptime is a javaScrpt function which displayes the current time.
the MM checks flash is because i have some videos i have added.
Now the main thing that isn't working is this part
DisplayDIV('SubKicks');HideDIV('LeftDiv');HideDIV('RightDiv');HideDIV('FrontDiv');HideDIV('SideDiv');
In my HTML code i have Display and Hide javascript functions, which will allow me to hide and show certain DIV tags.
I am confused at why the body tag doesn't like the display and hiding divs as this EXACT code works fine onClick on a button..... (I need it onLoad)
If anybody can help that would be great.
I assume i have missed out a semi colon or something somewhere but don't actually know where!??!?!?
Many thanks
Dan
|
|
|
|
|
<body onLoad="disptime()";"MM_CheckFlashVersion('7,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?');DisplayDIV('SubKicks');HideDIV('LeftDiv');HideDIV('RightDiv');HideDIV('FrontDiv');HideDIV('SideDiv');">
Looks like you are missing the closing single quote on your string literal "Content on this page...". Also there should be a semicolon after disptime() rather than a comma
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Surely:
onLoad="disptime();MM_CheckFlashVersion ...etc
instead of:
onLoad="disptime()";"MM_CheckFlashVersion ...etc
|
|
|
|
|
Right, I missed removing the quotes.
Error propagation by copy & paste
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I have a side project I am working on at home and I need help developing it. Is there a location on this site that allows me to post my ideas and requirements, and potentially hire someone / get estimates to work on this with me? I initially thought about the Jobs section, but that is more for a full time position vs this project I am working on.
Thanks for your time.
JM
John Michael
|
|
|
|
|
The jobs board is the best place if you are looking to hire someone, even if it is temp. The forums are for questions.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I have a simple syntax question... if you need more background I will post it.
Here is how it is called.
<input type="button" value="Go" onClick="goListGroup(document.listmenu0.firstlevel, document.listmenu0.secondlevel)">
function ShowContent(d) {
document.getElementById(d).style.display = "block";
}
function goListGroup(){
for (i=arguments.length-1;i>=0; i--){
if (arguments[i].selectedIndex!=-1){
var selectedOptionvalue=arguments[i].options[arguments[i].selectedIndex].value
ShowContent(selectedOptionvalue); return true;
break
}
}
}
This does nothing and I need to know what I did wrong. I am beginning by wanting to show the correct . and eventually show the contents into a all purpose and hide the previous content, but I am at the end of my knowledge here. Can anyone help?
|
|
|
|
|
I find the best tool for finding the root of Javascript problems is to run my code in Firefox with the "Error console" (Tools menu) open. (If IE's "Developer Tools" menu option has anything even half as helpful/good as that I've yet to find it.)
|
|
|
|
|
Hi,
Getting to familiarise myself to the PHP Language.
I am familiar with MFC/CPP,etc. My questions are now:-
-How do I Debug a Script. Is there a Debugger of kinds available to see what happens, and where I can set Breakpoints. I currently use 'AlleyCode' to view the scripts written by someone else.
- I Note that the language does not mention Virtual Functions. (So I would assume that there is no VTable Hidden Member.) Does that mean that I can Save and Retrieve a PHP Class (binary)Safely to and from a File using fread() and fwrite().
- Is there a way of Loading a DLL and Calling DLL Functions from PHP Code. If so, what are the Calling Conventions.
The List is much longer, but the above are for now the important ones.
Regards'
Bram van Kampen
|
|
|
|
|
For debugging, I usually just put in echo statements and watch what happens. I've also used the technique of logging things to a file on the server to see what happens during execution of a PHP script.
I'm not sure about your other questions. Since PHP is an interpreted scripting language, I'm not sure that saving a binary representation of classes makes much sense, but maybe someone else knows better than me. All my PHP work has been deployed on Linux boxes, so Windows DLL's don't make much sense there, either.
I haven't tried all the PHP tools, but there's a list that you might find useful at the PHP Tools[^] web site.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
For debugging I generally just dump variables to the page or a log using print_r[^]. Set the error_reporting[^] level to something useful and turn on the display_errors[^] option for development so you can see warnings and errors.
You can save and load class data using serialize[^] and unserialize[^]. Serialized data looks a lot like JSON.
For accessing a DLL there is W32api[^] - I've never used it myself though.
|
|
|
|
|
I designing a Chained Menu using 3 list boxes instead of combo boxes. I have the basic idea on how to do the chained menu, but on the list boxes I can not figure out how to resize the box and fonts to my specific wants. I also want to get rid of the vertical scroll bar. I know I have to create a customized list box, however I am at a loss on how and I can only use javascript (.js) or html.
anyone have an idea?
|
|
|
|
|
TreyUF wrote: I can not figure out how to resize the box and fonts to my specific wants
CSS comes to mind.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|