AleMonteiro 238 Can I pick my title?

You should use the DataSet as the DataSource and not the Adapter, and you are missing the DataBind too, try like this:

chart1.DataSource = ds2;
chart1.Visible = true;
chart1.DataBind();
AleMonteiro 238 Can I pick my title?

But you don't want it to exceed or you want the footer to go down with it?

AleMonteiro 238 Can I pick my title?

Last things first... you shouldn't relly on JS to calculate the final price. You can use JS to calculate and show the price to the user, but once you send the selected products to your PHP script you should use the prices from the database. What I mean is, don't post the price from JS to your PHP and use it to commit the transaction.

About storing the products, if your shopping cart will have more then one page you could store in the session in PHP. If it's only one page, you don't need it.
I don't think cookies are a good option because it has very low size limits (4kb I guess, but not sure)

About the UI, I suggest you take a look at jQuery UI Droppable examples:
http://jqueryui.com/droppable/#shopping-cart

http://jqueryui.com/droppable/#photo-manager

And googling a little bit I suggest you take a look at this two links:
http://dzineblog.com/2010/10/10-amazing-collections-of-ajax-shopping-cart.html

http://simplecartjs.org/

AleMonteiro 238 Can I pick my title?

What kind of screen, can you tell if it's from a web browser, from windows or really from the notebook manufactor?

If possible post a picture.

AleMonteiro 238 Can I pick my title?

You're wellcome, just mark as solved please.

AleMonteiro 238 Can I pick my title?

Good to hear it.

So mark as solved please =)

AleMonteiro 238 Can I pick my title?

But how do you want the result to be?

AleMonteiro 238 Can I pick my title?

Try this and see if works:

<?php

function user_exists($username)
{
    return true;
}

if(empty($_POST) === false)
{
    $username = $_POST['userName'];
    $password = $_POST['password'];

    if(empty($username) === true || empty($password) === true)
    {
        $errors[] = 'please enter a username and password';
    }else if(user_exists($username) === false)
    {
        $errors[] = 'we can\'t find that user, please contact AZ Media Production';
    }else
    {
        $login = login($username, $password);

        if($login == false)
        {
            $errors[] = 'That username/password combination is incorrect';
        }else
        {
            $_SESSION[`user_id`] = $login;

            header('Location: anounceEdit.php');
            exit();
        }
    }
    print_r($errors);
}
?>
AleMonteiro 238 Can I pick my title?

Even with the function in the same file and only returning true? Well, that's really strange.

Just to make sure, remove the import of init.php

AleMonteiro 238 Can I pick my title?

Ok, it's been a while since I coded PHP, but I'd do the following tests:

  1. Move the function from the init.php file to the login.php file
  2. Empty the function, make it only return true or false.

If the first test is successful it means that is something wrong with the path of the file your are importing or another error is causing this one.

If only the second test is successful it means that the code inside the function is wrong.

If none of them work, let me know and I'll try to think of something else =)

AleMonteiro 238 Can I pick my title?

If I had such problem I'd create the form with JavaScript. Then during the form creation I'd make ajax calls to the server that validate if the form can or can't be created, here you could insert the idea of a unique key generated by the server.

So it would be something like this:
1. Page HTML loaded (only with basic stuff)
2. JavaScript form script loaded dynamically with the Unique Key inserted in the middle of it (not as a parameter and to make it even harder you could split the key into separete variables and use a complex algorithm to join them before sending to the server)
3. JavaScript will make ajax calls to the server to validate if it can or can't create the form.

This way if someone try to copy your site they won't even see the form, because JS won't execute because of the security.

To make even better, after you create the form script use a minifier/obfuscator to make the code almost unredable. The only detail that you would need to take care is that you need to know where to insert the dinamically generated key into the script before sending it to the html.

Another way, that can be make in addition to this one, if the user is in another page of your site before going to the form page, you could use the before page to insert cookies into the browser and them in the form page …

AleMonteiro 238 Can I pick my title?

Your function is named wrong.
Named function: user_exsists
Used function: user_exists

Just a typo.

AleMonteiro 238 Can I pick my title?

There's no magic way to do it, but there's others ways like storing the values A,B,C in an array and loop for a match or using RegEx.

I'd use RegEx for a short code, something like this:

IF ( RegEx.Match(TextBox1.Text, "^[ABC]$").Success ) Then

End If

To use RegEx you need to import System.Text.RegularExpressions.

ImZick commented: Nice +2
AleMonteiro 238 Can I pick my title?

The best alternative is to create a function to hide/show rows, something like this:

function toggleRows(select, rows) {

    var display = select.selectedIndex == 1 ? '' : 'none';

    for(var i=0; i < rows.length; i++) {
        document.getElementById(rows[i]).style.display = display;
    }

};

And you should use as:

<select onchange="JavaScript: toggleRows(this, ['testing1', 'testing2', 'testing3']);">
AleMonteiro 238 Can I pick my title?

That's because you are executing the script before echoing the $data.

If you invert it may work:

<p style="margin-bottom: 50px;"></p>
<?php echo $data; ?>

<script type="text/javascript">
var url = "<?php echo $url; ?>";
var temp = getElementsByClassName('daniweb');
document.write(temp);
</script>

Or, the way I think is better, use the onload event of the window:

<script type="text/javascript">
window.onload = function() {
    var url = "<?php echo $url; ?>";
    var temp = getElementsByClassName('daniweb');
    document.write(temp);
};
</script>

<p style="margin-bottom: 50px;"></p>
<?php echo $data; ?>
AleMonteiro 238 Can I pick my title?

I think that is not possible using the <select> element, you'd have to create your own.

Maybe you could use the jQuery UI AutoComplete widget, it's kind easy to style.

Take a look at http://jqueryui.com/autocomplete/#combobox

AleMonteiro 238 Can I pick my title?

Were you able to log the exceptions?

A question, the user running the application on the server has permission to write files to the disk? If it doesn't, it would cause the error.

AleMonteiro 238 Can I pick my title?

Try this:

{document.getElementById('testing').style.display=''}else {document.getElementById('testing').style.display='none'};

The difference is like this: this.form['element_name'] and document.getElementById('element_id')

I have a curiosity question for you, what server-side language are you using?

AleMonteiro 238 Can I pick my title?

What is showresults(eReg|HRI_Asthma) suppose to mean?

AleMonteiro 238 Can I pick my title?

I didn't understand much of what your problem is. But is something like this that you want?

<!DOCTYPE html>
<html>

<head>

<link rel="stylesheet" type="text/css">

<style>

div
{
  text-align: right;
  padding: 1px;
  margin: 1px;
  color: #006666;
  font-family: arial;
  font-size:28pt;
  font-weight:700;
  background-color:
  } 

</style> 
<script type="text/javascript">

function calculate(inputId, outputId)

{

A = document.getElementById(inputId).value;

outDiv = document.getElementById(outputId);

B =(parseInt(A) * 1.0);

//alert(A);

D = (parseInt(B) * 1.0 );

if ( B <= 19)

{

tax = 0.00;

}

else if (B <= 30)

{

tax = (B * 3.95) * 1;

}

else if (B <= 40)

{

tax = (B * 3.75) * 1;

}

else if (B <= 50)

{

tax = (B * 3.70) * 1;

}

else if (B <= 60)

{

tax = (B * 3.55) * 1;

}

else if (B <= 70)

{

tax = (B * 3.40) * 1;

}

else if (B <= 80)

{

tax = (B * 3.25) * 1;

}

else if (B <= 90)

{

tax = (B * 3.10) * 1;

}

else if (B <= 100)

{

tax = (B * 2.95) * 1;

}

else if (B <= 150)

{

tax = (B * 2.80) * 1;

}

else if (B <= 200)

{

tax = (B * 2.65) * 1;

}

else

{

tax = (B * 2.60) * 1;

}

outDiv.innerHTML = '£'+tax;

}

</script>

</head>

<BODY>
<p style="margin-left: 3">
<i><font face="Arial" color="#006666" style="font-size: 9pt">Enter Quantity (sq m)</font></i>
<INPUT id='inputA' NAME="text2" size="1" value="20"maxlength="3" /> …
AleMonteiro 238 Can I pick my title?

I don't know if it was a typo on the post, but it's $_POST and not $POST.

Another thing, I'm guessing, but I don't hink <input type="(float)number" name="price" /> is a valid markup.

AleMonteiro 238 Can I pick my title?

Good for you. It's the best implementation! =)

AleMonteiro 238 Can I pick my title?

Oh Ok. So if a PM can be sent just to one user, there only two options of deleting the message: either the user who sent deleted it or the user who receieve deleted it, or both. So you could just add two columns on the PM Table: ToVisible, FromVisible.

It's simpler, isn't it?

AleMonteiro 238 Can I pick my title?

Were you able to find the form element?

AleMonteiro 238 Can I pick my title?

If I understood you structure, if a user send the same PM to multiple users, this PM will be inserted multiple times into the PM table. Is that correctly? I assumed this because of the ToId field.

If I supposed correctly, then you don't need the second table. Because when a user deletes the recieved PM you'll only update or delete it's own record and not from every user that recieved that PM.

That said...

Another way of doing this, that I prefer, is to avoid duplicating the PM's. So you'd have an PM table only with FromID and the PM settings, and another table PM_Receivers (in example) that would relate the PM with the receivings users.
This way the body of the PM (that can be large sometimes) will be stored only once, and you have flexibility to handle users options to delete, hide, restore and etc the receiveds PM's.

This way a trigger woudn't be helpfull, because the PM table would not have the ToID to be inserted on the other table, you'd have to do it with PHP.

Hope it helps.

AleMonteiro 238 Can I pick my title?

It's not a simple implementation indeed. You need to organize your thoughts and try to visualize how it would work when done.

In cases like this the coding is quite simple compared to the effort of planning the structure, events and logic invloved.

You need to realize that HTML/CSS/JS work toggether and one may affect the behavior of the other.

So, in this scenario, planning the html structure and how it will be positioned by CSS is fundamental.

AleMonteiro 238 Can I pick my title?

You need to get the action from the Form element, something like this:

var $input = $(this),
    value = $input.value,
    $form = $input.parents("form"),
    action = $form.attr("action");

    alert(value); // Test the value from the input
    alert($form.length); // Test if the form was found ( bigger then 0 means it was )
    alert(action); // Test if action was found

$.post(action, { field: value }, function(data)
{
    alert(data); //The resulting code should return 'Not in database.' or 'Is in database.' only and nothing else.
}
AleMonteiro 238 Can I pick my title?

None of the styles are being applyed? If so it may be a wrong reference to the css style sheet.

To verify this type of problem you can use this steps in any browser debugger(FireBug or Developers Tools in example):
1. Check if the CSS file was downloaded (in the Network tab)
2. Check if the CSS file was loaded correctly (in the styles tab)
3. Check if the element has the css class applied to them (in the HTML tab use the tool Insepect Element and click at it)

If the css style is at the same file that the JS and HTML, then open the console and check if there's any erros thrown.

Hope it helps.

AleMonteiro 238 Can I pick my title?

You can either create another file(my suggestion) or insert and IF at the begining of the page.

When you make an HTTP Request to an webpage it will return all things that were wrote in the response. This mean that any html tags that are not handled by the server-side script(php in this case) will be returned as well.

In my opnion the best option is to have a page(or more if you have lot of methods) only for AJAX methods.

AleMonteiro 238 Can I pick my title?

Here's a code sinnept that may help you, but it's not using jQuery:

<html>
    <script>
        function slcMes_change()
        {
            document.getElementById("slcDia").options.length = 0;

            for(var i=0; i < 31; i++)
            {
                document.getElementById("slcDia").options[i] = new Option(i+1, i+1);
            }
        }   
    </script>
    <body>
        <select id="slcMes" size="1" onchange="slcMes_change()">
            <option value="0">Select</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
        </select>
        <select id="slcDia" size="1"></select>
    </body>

</html>
AleMonteiro 238 Can I pick my title?

What do you mean by "they do not appear in the context that I gave them"? I didn't understand your problem.

AleMonteiro 238 Can I pick my title?

I just tested and the checkboxes seems ok, but IE JS Debugger throws a few exceptions that you should look into.

AleMonteiro 238 Can I pick my title?

You have to add an onChange event to the "masters" selects, and when they change you update the require rows.

AleMonteiro 238 Can I pick my title?

You could use jQuery as suggested by dany12, it's a great idea because it really simplifies your job.

But, if can't or won't use jQUery this is how you can do it with pure JS:

function disabledFrame()
{
    var frm = parent.Left.document.hi, // Reference to the form in the Left frame
        links = frm.getElementsByTagName('a'), // Reference to the array of <a>'s
        i=0, // Counter to loop the links
        il=links.length; // Links length


    for(; i<il;i++){
        disableAnchor(links[i], true); // Disable link
    }
}

// Function obteined from http://geekswithblogs.net/TimH/archive/2006/01/19/66396.aspx
function disableAnchor(obj, disable){
  if(disable){
    var href = obj.getAttribute("href");
    if(href && href != "" && href != null){
       obj.setAttribute('href_bak', href);
    }
    obj.removeAttribute('href');
    obj.style.color="gray";
  }
  else{
    obj.setAttribute('href', obj.attributes['href_bak'].nodeValue);
    obj.style.color="blue";
  }
}

See this link to understand how the disabling of an anchor is done: http://geekswithblogs.net/TimH/archive/2006/01/19/66396.aspx

Good luck.

AleMonteiro 238 Can I pick my title?

Wich URL gives HTTP error 500?

AleMonteiro 238 Can I pick my title?

Try putting those two lines at the begining of the page and see if throws any other errors:

error_reporting(E_ALL);
ini_set('display_errors', 1);

You could also try using function_exists to check if the function is defined.

AleMonteiro 238 Can I pick my title?

There are some steps that you can do to verify where the problem lies:

  1. Debug the JavaScript code with your browser to see if $("form#myForm").serialize() is returning what is expected.
  2. Use your browser network watcher to ensure that the data is being sent
  3. Debug your PHP code to ensure that the data is recieved

If the data is recieved in your PHP code then is just a matter of validating the data and inserting into the DB.

Good luck.

AleMonteiro 238 Can I pick my title?

If you really want to learn I suggest you code yourself thru with NotePad++, or any other developers editor.

Using DreamWeaver, or any other WYSIWYG editor, can be quite productive, but you won't learn about coding.

AleMonteiro 238 Can I pick my title?

It's seems that the vertical scrollbar is working OK, tested on Opera and IE 9.

Capture59

AleMonteiro 238 Can I pick my title?

Try debugging and watching each variable to see it's state

AleMonteiro 238 Can I pick my title?

Do you want to learn how to code a site or just want to make one as fast as possible?
In the first case, read, read and read even more about it.
In the second case, I suggest using Joomla, WordPress or WIX (as suggested by <MICHAEL>)

AleMonteiro 238 Can I pick my title?

You shouldn't declare the imgMember and imgPath twice(once in each function) this can lead to the image being saved with one name to the disk and in the DB with another.
Create the name only in the page load and pass it as a paramater to the CreatePhoto method.

Did you check if the image is being saved to disk but not on the DB or the vice-versa?

Another thing, you're not handling any exceptions. I'd suggest you log them to a .txt file so you can verify exatcly what's going on.

You could also use a network watcher, like FireBug or Developer's Tools to verify if the imageData parameter is being sent or not.

Another thing that may be the problem is the size of the image. Verify the request limit and request timeout on your webconfig.

AleMonteiro 238 Can I pick my title?

As pointed by stbuchok, your syntax is invalid. It should be:

$('#div').load('/controller/_partialview');
AleMonteiro 238 Can I pick my title?

It's seems that all important code is inside functions that you didn't post, like have_posts(), the_post() and post_class()

By the code posted I think you can do the filter altering only the have_posts() function but we need to see the code so we can help.

AleMonteiro 238 Can I pick my title?

I don't have much experience with VB, but I would try something like this:

Dts.Variables("User::ReNameFile").Value = Dts.Variables("User::fileName").Value.ToString() + DatePart(DateInterval.Month, Now).ToString() + DatePart(DateInterval.Year, Now).ToString() + ".csv"
AleMonteiro 238 Can I pick my title?

Alright, so let me point to you the steps that need to be taken care of:

  1. To make the div "original" 100% of the window you need to set the html and body to 100% too.
  2. You'll need to disable auto overflow, because if you have 2 childrens that are 100% of the parent, their size combined will be 200% (creting an auto scroll)
  3. In my example the position of the elements are absolute, so if you make them 100% they will not fit in the container, you'll need to remove/handle the top and left css styles.
  4. Using a star schema as my example, you'll need to handle scroll vertical and horizontal.

Those are the itens of the top of my head that need to be taken care of.
Good luck

AleMonteiro 238 Can I pick my title?

I think using float is too much risky. If you forget to use clear you may mess up your layout and if you have lots of floats it can be really painfull to find and correct the problem.

I've been using this css class to position elements inline without using float and it's cross browser.

.inline
{
    position: relative;
    display: -moz-inline-stack;
    display: inline-block;
    zoom: 1;
    vertical-align: top;

    *display: inline; /*for IE < 8 */
}

If you want to align right just wrap the itens with text-align: right;.

This solved a lot of problems for me.

Hope it helps.

AleMonteiro 238 Can I pick my title?

Vizz, as I said in my last post, I don't think you understand what you are trying to do.

If you try to move on with the code I posted I don't think you'll be able to accomplish whatever you're trying to do.

Please take a moment and write exatcly what you're trying to accomplish.

AleMonteiro 238 Can I pick my title?

Fobos, he can't request the data with AJAX because of the security box. AJAX requests can be made only to the same domain/subdomain of the site making the request.
To pull the data with AJAX he'd have to create an server-side page that would request the data from the site, and then the AJAX request would be made to this server-side page.

AleMonteiro 238 Can I pick my title?

The use of the setFullSize should be like this:
setFullSize($("#original"));

But that won't make the desire result I think.

I don't know exaclty what you're trying to do. To be honest, I don't think you know either.

Take some time to think about what you are developing and how it could work as a whole.