Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Make a javascript post for public view

    Hi everyone,

    I'm new here, in dire need of some expertise. So I hope there's someone out there that can effectively solve this problem I'm having.

    I am building a website with my brother. We now have a row of topbuttons with categories.
    When clicking on a category button, below the category buttons slides a div with pictures and buttons. Those buttons that slided in, fill a div in the rightside of the site when clicked.
    So basically what is selected in the top categories and their subitems, will be shown in the right side of the site.

    Now, we found that these changes in layout, only occur for the user that clicks them. We want to have these choices move for public view, and saved (until told to be gone again).

    I was thinking it might be something in the js like adding a .post or something like that, but I'm really clueless.

    Below I will show you the script used to fill the right div with content from the top div:

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.js"></script>
    <script type='text/javascript'>
    //<![CDATA[
    $(window).load(function(){
    $('button.button_charsA1').bind('click', function() {
    $('div#charsA').html($('div#chars_top_A' + ($(this).index()+1)).html());
    });
    $('#charsA').toggle(500);
    $('button.button_charsA1').click(function() {
    $('div#charsA').toggle(500);
    });
    });//]]>
    </script>
    If there is anything else you have to see to be able to help out, I will add the needed parts in the code for you.

    So, does anyone have a genius solution?

    thanks in advance!
    greetings,
    Noah

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    so you want your users to be able to change the layout of your site and you want those changes to happen for all the users of the site? Am I understanding this correctly? If so you are going to need a server side solution to store that information and present it to each user. a database being the most obvious choice.

  • Users who have thanked DanInMa for this post:

    No4h (07-01-2013)

  • #3
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks!

    The situation is that me and my brother want to make a site on which we can develop on a project.

    Him and me should be able to change stuff indeed as you said. I am not expecting any other users on the site so perhaps I wont need to worry about setting ourselves as admin or whatever.

    The site has a host with ftp, is this a database? (lol excuse me if I am absolutely noobish)

    If not do you have recommendations?

  • #4
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    ftp hosts all the files for your webserver. databases store information.

    If you just want to make a website that you can both edit, that is what the ftp connection is for, to upload and download files to your site. if that is all you need to do then you have the tools needed you jsut have to coordinate with each other to ensure you don't overwrite changes

  • #5
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    another option is using a host with that has a "web page building tool" as art of thier hosting services. another option is to use a wordpress type of site

  • #6
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thing is though, we have images on the site, in a div. They are all in ftp.
    Onsite we click an image, and it is loaded into the scene. We want to use this mechanism to change the layout of that page publicly, so we can avoid going into the html or css and adding the images in there.

    Then we can focus completely on the goal of the site without coding what we want to see everytime.

    So we need a database. How does one go about making one? It only has to contain the images that we uploaded to the ftp.

  • #7
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    you click on an image and it is loaded into the scene...... ok so you have a page coded already that does some of this for you? I'm sorry but your description is somewhat vague. Can you show an example of your website ?

  • #8
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ok, for some reason it wouldnt work if I only copypasted part of html into jsfiddle, so I made the same type of functionality, only then basic.

    check out this fiddle:

    http://jsfiddle.net/8f8jt/399/


    the image below the button is the preview of what will emerge in the empty box to the right.
    The button loads the previews content into the right box.

    So now you have done this, but it is only for you as a user. Now I need the button to also function as a post submit.

    I hope this clears it up a bit!

  • #9
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Excuse the double post..!

    I realize that previous post with louzy fiddle is a bit dumb on my part, since i could just send you the link in a pm..

    You will receive it shortly!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •