JavaScript not Working

(7 posts) (2 voices)

Tags:

No tags yet.

  1. bushraj, Member

    Hey,

    When I m deleting a row in editable reports, it is not showing the java script alert message for confirm deletion .However, I have just copy paste the procedures which are present in mydbr documentation for deleting rows. Kindly tell me why the java script is not working.

    I'm using ver 3.5 of mydbr, Premium trail version.

    Awaiting for your reply .

    Thanks.

    Bushra

  2. myDBR Team, Key Master

    Could you show the report code you have. The confirmation dialog code should be defined in callbefore directive.

    --
    myDBR Team

  3. bushraj, Member

    CREATE PROCEDURE sp_DBR_films()
    BEGIN

    select 'dbr.javascript',
    "
    function confirmdel(obj)
    {
    return confirm('Delete film \\''+$(obj).parent().children().eq(0).text()+'\\'?');
    }";

    select 'dbr.report', 'sp_DBR_film_delete', 'callbefore=confirmdel';

    select Title, film_id
    from sakila.films;

    END;

    and procedure for deleting...

    CREATE PROCEDURE sp_DBR_film_delete( in_film_id int )
    BEGIN

    delete
    from sakila.films
    where film_id = in_film_id;

    END;

  4. bushraj, Member

    Same in-place editing ,when I select the editable column,OK and Cancel buttons are not present .. but it is updating the records successfully .. I think there is some problem with java script or in some code files.. Please do tell me why this is happening plus ,with name of the files which are using these features so that i can debug it too .

    Please reply asap it causing a lot of trouble . Thanks

    Bushra.

  5. myDBR Team, Key Master

    Please modify the code to include an embedded element. We take a look at the documentaion. It looks to be incorrect.

    CREATE PROCEDURE sp_DBR_films()
    BEGIN

    select 'dbr.javascript',
    "
    function confirmdel(obj)
    {
    return confirm('Delete film \\''+$(obj).parent().children().eq(0).text()+'\\'?');
    }";

    select 'dbr.embed_object', 'hiddendiv';
    select 'dbr.report', 'sp_DBR_film_delete', 'hiddendiv','inFilm_id=film_id', 'callbefore=confirmdel';

    select Title, film_id
    from sakila.films;

    END

    As for the in-place editing, the OK and Cancel buttons are no longer displayed by default.

  6. bushraj, Member

    Thanks for the response.. It Worked!

    So how we can display OK and Cancel buttons in-place editing.. What code we have to write? OR this feature is not available anymore?

    Thanks for your swift response.

    Regards,
    Bushra

  7. myDBR Team, Key Master

    The default behavior of the editing functionality is autosave since myDR 3.5.1.

    If you want to use separate OK and Cancel buttons in editing, add "options={'onblur':''}" as a parameter to dbr.editable.

    --
    myDBR Team


Reply

You must log in to post.