• Member Avatar for ryantroop
    ryantroop

    Replied To a Post in calculation in javascript

    onclick="Calculate();" (line 65) Just add the parens. Right now, your onclick method is just a pointer to a function, but does not actually execute said function.
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Apache WSS Secure WebSocket

    Hello, I made a WebSocket service in Apache under CentOs with PHP and JS that works great if the protocol is ws:// . The problem is that the site is …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Apache WSS Secure WebSocket

    If I recall, a websocket is just an HTTP request that gets upgraded to a persistent connection. I haven't read the spec entirely, but it's much like a 302 response, …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Need help in c++

    Q 1) In this small snippet #include <stdio.h> void passingAddressOfConstants(const int* num1 , int* num2) { *num1 = num2; } int main(){ const int limit = 100; int result = …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Need help in c++

    likely because you are passing limit twice, once as a const int, and then trying to cast it as an int when it is clearly a const int. My C++ …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Help with C/Embedded SQL

    Hi all, I'm new to this forum. I'm learning C and embedded SQL. I have a question. In one of the project am doing, i want to check whether any …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Help with C/Embedded SQL

    The query itself will determine if you have data. `"select * from table where id = 1 and date > dateadd(d, -90, NOW())"` (of course that's psudo-code so YMMV) If …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching How to integrate payment gateway - SADAD

    I had develop the website and according to requirement I have to integrate Payment Gateway-SADAD. Can you provide me the document for this purpose so that I can integrate SADAD …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in How to integrate payment gateway - SADAD

    I am not familliar with Sadad, but if they are like any other payment gateway, they will have an API that you must process data in a specific way and …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching I am good enough for this

    I am a 19 year old guy who is yet to get a CS degree from the university. I learned web development on my own from resources online. Mostly from …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in I am good enough for this

    I too went from teaching to programming. I had the same worry as you did. The best advice I can give you is to bring code examples with you to …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Starting Canvas Woes !

    This may also be of interest... https://jroatch.nfshost.com/2012/svg-a-day/complex-star-morph.svg
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Starting Canvas Woes !

    http://www.w3schools.com/svg/svg_polyline.asp You will notice the line has a "stroke" which basically maps to thickness in pixels. However, I really think you are looking for stuff like... http://svgopen.org/2010/papers/28-Fractals_Visualization_Using_SVG/ http://codepen.io/collection/aBwGo/ Or, if …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching clicking one button affects all values in database

    I wasn’t sure which forum to put this under so I just selected web development. I have run into an issue that ironically I have solved before but thanks to …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in clicking one button affects all values in database

    May just be a preference thing.. but making tables on the fly like that is probably not a good idea (and resource heavy), and then you iterate through your table …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Starting Canvas Woes !

    I dont mean to ruin your day, but Flash may be better suited to your goal. It is the best of both worlds (SVG and Canvas) and has built in …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Starting Canvas Woes !

    Do you have a real world example of your goal? Or a mock up? Not sure what you are envisioning. Side note: SVG = Scalable Vector Graphics. It's sole purpose …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Starting Canvas Woes !

    The canvas is simply a grid. 0,0 -> whatever you define. Since you know this, you can keep, say, an object that has each item being an array of points: …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Starting Canvas Woes !

    On a canvas, once the pixels are drawn they are permanent, and reference to the individual line draw is lost. If you want to modify individual points you have a …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Starting Canvas Woes !

    Canvas won't draw a [line](https://jsfiddle.net/WildWind/axboxp2e/) ?
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Starting Canvas Woes !

    The canvas is a coordinate system. It is entirely pixel based (I may be over simplifying..), and it starts at left 0,0.
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in how to pass php array parameter into js function where i want its id to

    function func(param = <?php echo json_encode($row[0]); ?>) { This is most definately a syntax error in javascript. :(
  • Member Avatar for ryantroop
    ryantroop

    Began Watching how to pass php array parameter into js function where i want its id to

    I want to pass array value directly into the js fucntion which in loop and wanted to retrieve its query string id of selected employee here is code as i …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in how to pass php array parameter into js function where i want its id to

    Your JS function needs to accept a parameter, and the PHP ouputs said parameter... while($row = mysql_fetch_array($res)){ echo "<tr>". "<td> <p><button onclick=func({$row[0]}) >View</button></p> </td>" ."</tr>"; is technically "fine" (assuming $row[0] …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Retain the field values after refreshing

    Hi, In a form, I have 4 select boxes(default), and two text boxes(default). If I click the first (static values) based on that next second(new) select box will come (it …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Retain the field values after refreshing

    You have two options: 1) Ajax instead of a form post. This way, the page never refreshes. 2) The form page will need to consume the previous form post, and …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in how to make websocket connections ?

    There is actually a standard for websockets. It's an http call that gets upgraded to a persistent connection. Both the software handling the http connection (either Apache or IIS) needs …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in how to make websocket connections ?

    :-/ You sure you're ready to play with web sockets? Your server should already be set up to handle a socket connection. If it isn't, that's the first thing you …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Why am I Getting NaN error

    I have **NaN** error with following code. I have timer of 10 seconds to reload page. When Page reloads first jquery knob gives NaN value and then starts countdown of …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Why am I Getting NaN error

    I dont mean to be a buzz kill... but why not just do a setTimout for 10000ms and reload the page? `setTimeout(function() { location.reload(); }, 10000);` Then, you don't have …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in how to make websocket connections ?

    Did you follow the example in the link I posted?
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Multi-leveled OOP in JavaScript.

    I have been cuddling with OOP programming. JavaScript seemed like a good start. I went to w3schools.com. function person(first, last, age, eye) { this.firstName = first; this.lastName = last; this.age …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Multi-leveled OOP in JavaScript.

    Once you return something in JS (and most other languages) any data further down is ignored. So, your scoped "name" function returns with firstName + lastName, and the rest is …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Format iframe element

    Hi There On this example page http://www.divepoint-samui.com/ I have an iframe: <h3>Our Happy Clients</h3> <div class="clients-wrapper"> <iframe src="http://www.divessi.com/extern/recent_certs.php/766494/2" frameborder="0" name="Our Recent Diver Certifications" id="recentDivers" ></iframe> <iframe src="http://www.divepoint-samui.com/ssi.php" style="border: 0" width="800" …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Format iframe element

    The only way to dynamically size an iframe is to let the frame load and at the end of the onload event make a call to the parent that returns …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching how to make websocket connections ?

    I am new in programming language. I was trying to create an websocket connection, this is my all line of js var url="ws://localhost:8080/WebsocketTests/"; w= new webSocket(url); and i got this …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in how to make websocket connections ?

    http://www.tutorialspoint.com/html5/html5_websocket.htm unlike everything else in JS, objects are generally CamelCase as opposed to pascalCase :-/
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Contact form not sending attachment

    Please help I am creating this contact form where everything is working fine but I am not getting attachment in the email, What am I doing wrong? Here is the …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Contact form not sending attachment

    This may answer your question: http://stackoverflow.com/questions/8898077/copying-the-value-of-a-forms-file-input-field-to-another-forms-input-field tl;dr: It's a security risk to simply apply an input's file data to another form element. You would need to clone it directly, and …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching Correctly align backgrounds and images

    Hi Dw. I'm not a pro in web design and I've used CorelDraw to draw a website background which is a web page centered image which the web contents will …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Correctly align backgrounds and images

    Your problem lies with a fundamental misunderstanding of how CSS works with the DOM. You may want to read up on relative positioning, and how you center content in all …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in Hash & Salt db connection settings (password)?

    You know.. I re-read your post and Im a bit confused... so I want to clarify and maybe direct you in a different direction. If you are using an application …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in .htaccess is not working

    try: Options +FollowSymLinks -Indexes -Multiviews <IfModule mod_rewrite.c> SetEnv HTTP_MOD_REWRITE On RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|css|js)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*).html$ /article.php?url=$1 [NC,L] </IfModule> basically set …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching 2 Questions for Developers/Programmers

    This is kinda a poll. Please reply, and answer the 2 questions shortly, so I can get a grasp of your feedback. I want to know if there is a …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in 2 Questions for Developers/Programmers

    > The only words that would get skipped over without executing code would be ones that are actually generated on the fly. But that rarely actually happens in code. Hah! …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching insert values into mysql table using ajax in session

    In a form, I am displaying a select box value , based on that select box value i show two more select boxes using ajax in div id. And I …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in insert values into mysql table using ajax in session

    You will have to be a bit more clear on your goal. When you say session, are you talking about a PHP session? A cookie? The current "browser session"? Perhaps …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching .htaccess is not working

    Hi friends i am facing some url redirection issue in my .htaccess. please help me to fix it. **my url is** domainname.com/article.php?url=test.html **my expected URL is** domainname.com/test.html **.htaccess** Options +FollowSymlinks …
  • Member Avatar for ryantroop
    ryantroop

    Replied To a Post in .htaccess is not working

    I believe you are missing your leading slash.. RewriteRule ^/([a-zA-Z0-9-/]+).html$ /article.php?url=$1 Also remember, do MOST specific to LEAST specific. So, your order is incorrect. You also seem to be missing …
  • Member Avatar for ryantroop
    ryantroop

    Began Watching PHP data to javascript/html

    Hi there, I' ve got some data in my database and I' m using PHP to fetch it and would like to transport it to client side via JSON. The …

The End.