Jump to content

[dx]

Members
  • Posts

    719
  • Joined

  • Last visited

Everything posted by [dx]

  1. I initialized it above. I need store data like this: var key = some_function_here(); data['events'][key] = { event: 'event-name', something: 'else' } So, I'll have multiple arrays for "key".
  2. Hi, How to store data to array but key based on variable so like: var x = 'key'; data[x] = 'value'; If I do console.log(data), I see "x" instead of "key". I need store multidimensional array in format:
  3. Well I've noticed that it isn't php side mistake. File (.html) which is requested via get_file_contents() has <script> tag which asks for external js file on some path, and that script calls url from location.href. So when I go from external url it can't reach right host. Instead of http://host:port/client, it opens http://localhost/client
  4. I mean rest of script which is using this "user" from url.
  5. Nah We have Page A which is requesting and Page B which is handled with node server. It's only .html file. So if I open Page B from http://host:post (direct link), it works fine. Also if I add http://host:port/?user=username_here everything is fine, Page B catch from url and works as it need. But if I on Page A use echo get_file_contents('page_B_URL/?user=username'); nothing is happend. Actually, I get html elements, but can't open rest of protocol which is based on this "user". I guess that is error. Missing parameter. Also, if I go to http://host:port without arguments, it uses "undefined" as "user", it's weird.
  6. Hi, I have started process with nodejs on some http://host:port Basicly if I use http://host:port/?user=something, everything works as it should. Point is that i need somehow include that part of page (from url, avoiding iframe) in another (thinking about get_file_contents) but my problem are those arguments. I read about $context parameter, so can I send data with POST method instead of GET in link above using stream_context_create() and catch it in nodejs part (which logicaly works with javascript) and then work what I want. Currently i use location.search and extract data which I need. What do you suggest? Regards
  7. How it should work? Open socket connection to nodejs? How to make connection with data and user who sends?
  8. Hi guys,I'm trying to make some web irc client based on nodejs.So I'm trying to understand how it should work. I'm using this module https://github.com/martynsmith/node-irc but it's only node <--> irc server communication part.So how I can make and which library to use to make web browser <--> node part?Regards.
  9. Hi, These days I'm frustrated of researching for running video on iPad with full screen mode in native player. I can't get video in full screen. I'm using iPad 2. Which Javascript method does iPad using? Best regards.
  10. [dx]

    iOS load event

    Hi, I need onload event for iPad/iPhone/iPod. Tried: $(window).load();<body onload="func()">window.onload = function() { } Even tried: var checkLoad = function() { if (document.readyState == 'complete') { //loaded } else { setTimeout(function() { checkLoad(); }, 11);}checkLoad(); Nothing works, but only last solution sometimes retuns "complete" and sometimes "interactive". Regards
  11. [dx]

    Disable scrolling

    How about clicking on scrollbar and moving down? Can it be disabled?
  12. Hi, I need quick script which will disable my vertical scrolling.I don't want it to hide with overflow, just disable, but it will be shown as before. I've tried with $(window).scroll(function() { $(window).scrollTop(lock_top);}); And lock_top is defined before with click event. So this scrolls page with about 100px, and then jups to lock_top value. I've tried also event.preventDefault() but unsuccessfull. Best regards
  13. It sets correct value but page is somehow rescaled like it's zoomed to 90%. If I set border on div which width is changed, I can see right border offset from right about 100px.
  14. Hi, I'm trying to get new width and height when orientation is changed on iPad. So, I'm usinng this function: var ratio = 1; var orientationChanged = function() { if (window.orientation == 0 || window.orientation == 180) { return { browser_width: screen.width, browser_height: (ratio == 1 ? window.innerHeight : (screen.width / ratio)) } } else if (window.orientation == 90 || window.orientation == -90) { return { browser_width: screen.height, browser_height: (ratio == 1 ? window.innerHeight : (screen.height * ratio)) } }} var dimensions = orientationChanged(); if (!dimensions) { var dimensions = { browser_width: window.innerWidth, browser_height: window.innerHeight }} ratio = (dimensions.browser_width / dimensions.browser_height); $(window).bind('orientationchange', function() { dimensions = orientationChanged(); . . .}); Also, I'm using this meta tag: <meta name="viewport" content="height=device-height, width=device-width, initial-scale=1, maximum-scale=1" /> Problem is that I get correct values but when I try set with .css() or .width() it sets another value. I guess it sets good value, but problem lies in scale. I checked width after setting and it's good. So I need some advice.. Best regards..
  15. Returns wrong value.Returns 645 but toolbar is not more than 100 .. So it should return 1024 - toolbar
  16. Hi, I'm using iPad 2 and I need to know how to get height of page without toolbar.Currently I'm using screen.height but it returns me 1024px while in portrait mode. So just need to get screen.heght - toolbar height.. Best regards
  17. Then I need find something else.. But this is great in any case.. But I can't use it.
  18. Yes, it works with newly created window, but in current window won't, Even don't work in http://www.w3schools...window_resizeto where I changed this part: function myFunction() { window.resizeTo(500,500); window.focus();}
  19. Someone? Sorry for bumping..
  20. Yes, I just thought on it and came here for solution. I want create new window, resize and move to right border of screen. That's easy part of story, but how to resize current window? I've tried this.window , window , parent.. Neither of them don't work.
  21. Hello, I need to have two parts of web page. On one side is my web and on other side is chat. So I need to make my chat stays on page and not reload even if users click on links on web. I have done it with iframes before, two iframes which calls files, and works fine, but iframe takes too long to load page. So I need something quicker but in same functional. What do you suggest?
  22. Hello, I have code which calls function which slows for a while becouse it uses mysql_connect() to remote server etc. I wan't to avoid waiting for response, and just continue with rest of code no matter what happens with function.. Waiting causes my script to do EMPTY_RESPONSE in chrome. Best regards
×
×
  • Create New...