Jump to content

XeNoMoRpH1030

Members
  • Posts

    72
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    xenomorph1030
  • Website URL
    http://www.bluelineattack.com

Profile Information

  • Gender
    Not Telling
  • Location
    Virginia

XeNoMoRpH1030's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm having issues retrieving the output parameters from a stored procedure. My work around for now was to just end the stored procedure with a select like the following: SELECT @out1 AS 'out1', @out2 as 'out2', @out3 as 'out3'; That works fine, but I don't understand why I wasn't able to get the output parameters. Take the procedure below for example (I simplified it for posting purposes). CREATE PROCEDURE [dbo].[test_procedure] @out1 int OUTPUT, @out2 int OUTPUT, @out3 int OUTPUT AS BEGIN SET NOCOUNT ON; ... business logic that sets those 3 variables ... SET NOCOUNT OFF; END The official examples I find do not use references while others do. Not sure what is correct in this case and there is confusion (definitely on my part) on which is correct. $sql = '{call dbo.test_procedure(?, ?, ?)}'; $out1 = 0; $out2 = 0; $out3 = 0; $stmt = sqlsrv_query($this->db->conn_id,$sql,array( array(&$out1, SQLSRV_PARAM_OUT), array(&$out2, SQLSRV_PARAM_OUT), array(&$out3, SQLSRV_PARAM_OUT), )); Those three variables will remain 0. I've tried without reference, specified SQLSRV_PHPTYPE_INT and SQLSRV_SQLTYPE_INT, to no avail. Any thoughts on what I am missing? I'm using the sqlsrv drivers version 3.0.1, SQL Server 2008 R2, and PHP 5.4.3.
  2. If I had to guess, the "bird" variable is not in the same scope (not accessible) when you are trying to do bird.onclick = function(); I'm not sure what library you are using, but if you set the bird variable before all of that (e.g. var bird; ) making it a true global variable and then when creating the image you ditch var, maybe that could work. Is there a reason you are creating a new image 10 milliseconds though? Maybe that wasn't the intent, but if it calls the $.drawBird function every 10 milliseconds, it creates a new image.
  3. Seems like the old HTML is being replaced by the HTML generated by the PHP script. The thing is, you need to rerun that function that assigns the events to the delete button. Although it looks the same to you, those elements are new. I'd make your Javascript an actual function and so you can call it after the HTML is inserted onSuccess.
  4. Be careful with <button> though. It's known that IE does not use it in the same manner as other browsers. Why are you trying to use a button anyway? Just curious as it doesn't seem like a case where you'd want to use one.
  5. Not sure if this is what you are looking for, but CSS: page-break-inside: avoid I've never tried it, but a quick search yielded that. Maybe add that to the table or rows.
  6. A quick search shows you are using Prototype, but your logic is wrong. If you ever wanted to stop it, you'd want to assign that to a global variable. If not, just the following would work new Ajax.PeriodicalUpdater('email-notifier', 'php/notifications/get_emails.php', { method: 'get', frequency: 1, decay: 1 }); without the functions and javascript timeout.
  7. One thing I'd consider at least is ditching your extra spaces. For example, you have <textarea id = 'message' name = 'message' rows = '10' cols = '100'> when it should be <textarea id='message' name='message' rows='10' cols='100'> Starting with proper HTML will at least help narrow down the problem area.
  8. I believe since you specified a width, it will not overflow past that width, unless you use the overflow property maybe. Have you tried overflow or maybe the CSS3 overflow properties (overflow-x)? Also, here is your CSS, but simplified. #filter { height: 263px; width: 703px; margin: 0 auto; background: url(images/filterby.png) no-repeat; }
  9. XeNoMoRpH1030

    html5

    HTML5 and CSS3 is still being finalized that I'm aware of. But several browsers do support them, or at least similar attributes (especially with CSS3). For instance, most of the new CSS3 elements in Firefox and Webkit (Safari) are specific to those browsers (-moz-border-image or -webkit-border-image for example instead of just border-image). IE9 looks promising and will be able to use those or that is at least the hope.
  10. Which version of IE? Looks fine in IE8.
  11. The only HTML option is to use a meta refresh. <meta http-equiv="refresh" content="0;url=http://example.com/" /> There are of course other methods if you rather not use HTML, such as server side and Javascript.
  12. Any Javascript library will help you out. I personally use Mootools and it's pretty easy. The way I accomplished something similar was setting a timer and retrieving the results every 5 seconds or so. I also only received the last 20 messages. I'm sure there is a better way though.
  13. I can say I have never seen a website work the way that you want, until I searched for it of course. There are several examples. I just searched for "ajax back button" and found multiple results.
  14. Oh, sorry. I skipped right over that. You can try something like: var id = posts.href.match(/\d+/);
  15. I'd probably first create two tables. Lets call one "parent" and the other "child". The parent name and ID can be stored in the parent table while the children will be stored in the child table with a parent ID and of course their own unique id. That's a relational database for you... The javascript seems pretty straight forward. Not sure how you are doing it, but lets say you have 10 inputs for children name and age, just to make it simple, with the name input being "child_name" and age being "child_age". Assuming the user enters the data correctly, you can use PHP to loop through it because those inputs will be an array. For example, if you post the data, you can loop through $_POST['child_name']. I can't say for sure if several elements will be empty, but I'm pretty sure all 10 would be posted. So, a better way is to have them enter how many children they have and dynamically create those inputs, or just have an "Add Child" button. Hopefully this gets you on track.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.